From where do I import settings from previous vers

2019-01-22 05:17发布

I was running Droidio (Android Studio) 0.6.1; from there I was not able to update to the newest version (a quantum leap to 0.8); I had to download it separately and install from Windows Explorer. But now the installation process is looking for old settings:

enter image description here

Where it seems to want to take me is here (to the Android folder, I reckon); this is what I see when I mash the "compressed ellipsis" (one dot) button:

enter image description here

...but I'm not sure that is really the right spot; Is it [not]? What is the precise name of the settings file I should be seeking?

UPDATE

I followed Gabriele's directive, and then I got this:

enter image description here

I chose "Use Android Studio's SDK"

And then I got this when trying to rebuild my project, "Error:Execution failed for task ':app:preBuild'. failed to find target android-19 : C:\Users\clay\AppData\Local\Android\android-studio1\sdk"

UPDATE 2

I then opened the SDK Manager and installed what was missing/out of date, and tried to build again.

I got the error, "Failed to refresh Gradle project 'Platypus' Error: Cause: failed to find target android-19: C:\users\clay\AppData\Local\Android\android-studio1\sdk Install missing platform and sync project

The "Install missing platform and sync project" part of the message is a link. I clicked it, accepted the License Agreement.

Once that finished, the build failed again with a similar message: "...failed to find Build Tools revision 19.1.0 Install Build Tools 19.1.0 and sync project"

Again, the "install..." jazz was a link; I clicked it, accepted, and installed...

The next problem child was, "Error:The project is using an unsupported version of the Android Gradle plug-in (0.11.2) Fix plug-in version and re-import project"

Acquiescing to the counsel of the wise old man in "Never Cry Wolf," I endeavored to persevere by clicking "Fix plug-in version and re-import project"

At which point I finally got a successful build.

UPDATE 3

I then ran the project, and it seemed to be running (it said so, and the red square was visible), but no emulator ever appeared.

I opened the AVD Manager, and the device had a warning icon (repairable). I clicked the "Repair" button; it seemed to work - the warning icon disappeared.

But then I got this:

enter image description here

It still won't display an emulator when I Run > Debug App...

It used to be (with Droidio 0.5* to 0.61) that the first time I ran, I would see this:

enter image description here

...and the Emulator would eventually come up; subsequent runs of the app, the Device would be listed at the top (under "Choose a Running Device") - no more, though - it is only at the bottom as shown in the scream shot above, even on subsequent runs of the app...

I reckon I should try "re-creating the AVD's weird, malformed config.ini" but don't savvy just what steps to take to accomplish that.

7条回答
叛逆
2楼-- · 2019-01-22 05:59

On mac Sierra, Android studio 2.3

/Users/[username]/Library/Preferences/AndroidStudio2.3/
查看更多
家丑人穷心不美
3楼-- · 2019-01-22 06:05

I had a similar problem like this. I found a different solution for it. https://stackoverflow.com/a/33021782/4747587

查看更多
啃猪蹄的小仙女
4楼-- · 2019-01-22 06:06

I used a method to trick the Android Studio to import settings from previous one without exporting the settings and it worked.

Just go to your previous .AndroidStudio\config folder, copy and paste them all to the new one (in my scenario I updated from 1.1 to 1.2 beta) .AndroidStudioPreview1.2

(For preventing any failure, please make a Rar file of your original config, also, after it works, export it so you can import it if you need it)

查看更多
啃猪蹄的小仙女
5楼-- · 2019-01-22 06:06

UPDATED 02/05/2016

If you are using AndroidStudio 2.1 you will find these folders:

  • in Windows should be in c:\user\yourname\.AndroidStudio2.1
  • in Linux should be in /home/yourname/.AndroidStudio2.1
  • in Mac should be in ~/Library/Preferences/.AndroidStudio2.1

If you are using AndroidStudio 2.0 you will find these folders:

  • in Windows should be in c:\user\yourname\.AndroidStudio2.0
  • in Linux should be in /home/yourname/.AndroidStudio2.0
  • in Mac should be in ~/Library/Preferences/.AndroidStudio2.0

If you are using AndroidStudio 1.5 you will find these folders:

  • in Windows should be in c:\user\yourname\.AndroidStudio1.5
  • in Linux should be in /home/yourname/.AndroidStudio1.5
  • in Mac should be in ~/Library/Preferences/.AndroidStudio1.5

If you are using .AndroidStudioPreview 1.4 you will find these folders:

  • in Windows should be in c:\user\yourname\.AndroidStudioPreview1.4
  • in Linux should be in /home/yourname/.AndroidStudioPreview1.4
  • in Mac should be in ~/Library/Preferences/.AndroidStudioPreview1.4

If you are using AndroidStudio 1.3 you will find these folders:

  • in Windows should be in c:\user\yourname\.AndroidStudio1.3
  • in Linux should be in /home/yourname/.AndroidStudio1.3
  • in Mac should be in ~/Library/Preferences/.AndroidStudio1.3

Your setting (with a Preview version):

  • in Windows should be in c:\user\yourname\.AndroidStudioPreview
  • in Linux should be in /home/yourname/.AndroidStudioPreview
  • in Mac should be in ~/Library/Preferences/AndroidStudioPreview
查看更多
We Are One
6楼-- · 2019-01-22 06:11

On my Mac, using Android Studio 2.1, the directory is

~/Library/Preferences/AndroidStudio2.1/

that is, not a hidden dir.

查看更多
该账号已被封号
7楼-- · 2019-01-22 06:16

Starting with Android Studio 0.8.0 (Beta) its now

/home/{username}/.AndroidStudioBeta

for a *nix environment

UPDATE:

Since Android Studio is now out of beta the settings can now be found in:

/home/{username}/.AndroidStudio
查看更多
登录 后发表回答