从哪里导入以前版本的Android Studio中的设置?

时间:2021-04-16 20:53:11

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:

我在运行Droidio(Android Studio)0.6.1;从那里我无法更新到最新版本(一个巨大的飞跃到0.8);我必须单独下载并从Windows资源管理器安装。但现在安装过程正在寻找旧设置:

从哪里导入以前版本的Android Studio中的设置?

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:

它似乎想带我去哪里(到Android文件夹,我估计);这是我在压缩“压缩省略号”(一个点)按钮时看到的内容:

从哪里导入以前版本的Android Studio中的设置?

...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:

我遵循了Gabriele的指示,然后我得到了这个:

从哪里导入以前版本的Android Studio中的设置?

I chose "Use Android Studio's SDK"

我选择了“使用Android Studio的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"

然后我在尝试重建我的项目时得到了这个,“错误:执行失败的任务':app:preBuild'。找不到目标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.

然后我打开SDK Manager并安装了缺少/过时的内容,并尝试重新构建。

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

我收到错误,“无法刷新Gradle项目'Platypus'错误:原因:找不到目标android-19:C:\ users \ clay \ AppData \ Local \ Android \ android-studio1 \ sdk安装缺少的平台和同步项目

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"

完成后,构建再次失败并显示类似消息:“...未能找到构建工具修订版19.1.0安装构建工具19.1.0并同步项目”

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"

下一个问题孩子是,“错误:该项目正在使用不受支持的Android Gradle插件版本(0.11.2)修复插件版本并重新导入项目”

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"

在“Never Cry Wolf”中默许这位聪明的老人的忠告,我努力通过点击“修复插件版本并重新导入项目”来坚持不懈

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.

我打开了AVD Manager,设备上有一个警告图标(可修复)。我点击了“修复”按钮;它似乎工作 - 警告图标消失了。

But then I got this:

但后来我得到了这个:

从哪里导入以前版本的Android Studio中的设置?

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:

它曾经是(Droidio 0.5 *到0.61)我第一次跑,我会看到:

从哪里导入以前版本的Android Studio中的设置?

...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.

我估计我应该尝试“重新创建AVD的怪异,格式错误的config.ini”,但不知道要采取什么步骤才能实现这一目标。

7 个解决方案

#1


31  

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

我使用了一种方法来欺骗Android Studio从以前的设备导入设置而不导出设置并且它有效。

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

只需转到您之前的.AndroidStudio \ config文件夹,将它们全部复制并粘贴到新文件夹中(在我的场景中,我从1.1升级到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)

(为了防止任何失败,请制作原始配置的Rar文件,在工作后,将其导出,以便您可以在需要时导入它)

#2


90  

UPDATED 02/05/2016

更新时间02/05/2016

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

如果您使用的是AndroidStudio 2.1,您会找到以下文件夹:

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

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

如果您使用的是AndroidStudio 2.0,您会找到以下文件夹:

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

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

如果您使用的是AndroidStudio 1.5,您会找到以下文件夹:

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

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

如果您使用.AndroidStudioPreview 1.4,您将找到以下文件夹:

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

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

如果您使用的是AndroidStudio 1.3,您会找到以下文件夹:

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

Your setting (with a Preview version):

您的设置(使用预览版):

  • in Windows should be in c:\user\yourname\.AndroidStudioPreview
  • 在Windows中应该在c:\ user \ yourname \ .AndroidStudioPreview中
  • in Linux should be in /home/yourname/.AndroidStudioPreview
  • 在Linux中应该在/home/yourname/.AndroidStudioPreview中
  • in Mac should be in ~/Library/Preferences/AndroidStudioPreview
  • 在Mac中应该在〜/ Library / Preferences / AndroidStudioPreview中

#3


9  

Starting with Android Studio 0.8.0 (Beta) its now

从Android Studio 0.8.0(Beta)开始吧

/home/{username}/.AndroidStudioBeta

for a *nix environment

对于* nix环境

UPDATE:

更新:

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

由于Android Studio现已停止测试,现在可以在以下位置找到设置:

/home/{username}/.AndroidStudio

#4


5  

On mac Sierra, Android studio 2.3

在mac Sierra,Android studio 2.3

/Users/[username]/Library/Preferences/AndroidStudio2.3/

#5


2  

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

在我的Mac上,使用Android Studio 2.1,目录是

~/Library/Preferences/AndroidStudio2.1/

〜/库/首选项/ AndroidStudio2.1 /

that is, not a hidden dir.

也就是说,不是一个隐藏的目录。

#6


1  

And in a *nix environment, this will probably be located at /home/[username]/.AndroidStudioPreview

在* nix环境中,这可能位于/home/[username]/.AndroidStudioPreview

#7


1  

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

我有类似的问题。我发现了一个不同的解决方案。 https://*.com/a/33021782/4747587

#1


31  

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

我使用了一种方法来欺骗Android Studio从以前的设备导入设置而不导出设置并且它有效。

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

只需转到您之前的.AndroidStudio \ config文件夹,将它们全部复制并粘贴到新文件夹中(在我的场景中,我从1.1升级到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)

(为了防止任何失败,请制作原始配置的Rar文件,在工作后,将其导出,以便您可以在需要时导入它)

#2


90  

UPDATED 02/05/2016

更新时间02/05/2016

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

如果您使用的是AndroidStudio 2.1,您会找到以下文件夹:

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

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

如果您使用的是AndroidStudio 2.0,您会找到以下文件夹:

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

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

如果您使用的是AndroidStudio 1.5,您会找到以下文件夹:

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

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

如果您使用.AndroidStudioPreview 1.4,您将找到以下文件夹:

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

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

如果您使用的是AndroidStudio 1.3,您会找到以下文件夹:

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

Your setting (with a Preview version):

您的设置(使用预览版):

  • in Windows should be in c:\user\yourname\.AndroidStudioPreview
  • 在Windows中应该在c:\ user \ yourname \ .AndroidStudioPreview中
  • in Linux should be in /home/yourname/.AndroidStudioPreview
  • 在Linux中应该在/home/yourname/.AndroidStudioPreview中
  • in Mac should be in ~/Library/Preferences/AndroidStudioPreview
  • 在Mac中应该在〜/ Library / Preferences / AndroidStudioPreview中

#3


9  

Starting with Android Studio 0.8.0 (Beta) its now

从Android Studio 0.8.0(Beta)开始吧

/home/{username}/.AndroidStudioBeta

for a *nix environment

对于* nix环境

UPDATE:

更新:

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

由于Android Studio现已停止测试,现在可以在以下位置找到设置:

/home/{username}/.AndroidStudio

#4


5  

On mac Sierra, Android studio 2.3

在mac Sierra,Android studio 2.3

/Users/[username]/Library/Preferences/AndroidStudio2.3/

#5


2  

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

在我的Mac上,使用Android Studio 2.1,目录是

~/Library/Preferences/AndroidStudio2.1/

〜/库/首选项/ AndroidStudio2.1 /

that is, not a hidden dir.

也就是说,不是一个隐藏的目录。

#6


1  

And in a *nix environment, this will probably be located at /home/[username]/.AndroidStudioPreview

在* nix环境中,这可能位于/home/[username]/.AndroidStudioPreview

#7


1  

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

我有类似的问题。我发现了一个不同的解决方案。 https://*.com/a/33021782/4747587