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

我当时正在运行 Droidio (Android Studio)0.6.1,从那时起我就无法更新到最新版本(一个飞跃到0.8) ,只能单独下载并从文件资源管理器安装。但现在的安装过程正在寻找旧的设置:

enter image description here

它似乎想把我带到这里(我估计是 Android 文件夹) ; 这就是我捣碎“压缩省略号”(一个点)按钮时看到的:

enter image description here

... 但我不确定那是否真的是正确的位置,是吗?我应该查找的设置文件的确切名称是什么?

更新

我听从了加布里埃尔的指示,然后我得到了这个:

enter image description here

我选择了“使用 Android Studio 的 SDK”

然后我在重建我的项目“ 错误: 任务“ : app: preBuild”执行失败。未能找到目标 Android-19: C: 用户 clay AppData 本地 Android-studio1 sdk”的时候得到了这个

更新2

然后,我打开 SDK Manager,安装缺失/过期的内容,并尝试再次构建。

我看错了“ 未能刷新 Gradle 项目“ Platypus”错误: 原因: 未能找到目标 Android-19: C: 用户 clay AppData 本地 Android-studio1 sdk 安装缺失的平台和同步项目

消息的“ 安装缺失的平台和同步项目”部分是一个链接。我单击了它,接受了许可协议。

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

同样,“ 安装..。”爵士乐是一个链接; 我点击它,接受,并安装..。

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

顺从“ 永远不要叫狼来了”中智慧老人的建议,我努力坚持点击“ Fix plug-in version and re-import project”

那时我终于得到了一个成功的版本。

更新3

然后我运行了这个项目,它似乎正在运行(它是这么说的,红色方块是可见的) ,但是没有模拟器出现。

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

但后来我发现:

enter image description here

当我运行 > 调试应用程序时,它仍然不会显示模拟器..。

过去(Droidio 0.5 * 到0.61) ,我第一次跑步的时候,我会看到这样的画面:

enter image description here

模拟器最终会出现; 应用程序的后续运行,设备会被列在顶部(在“选择一个运行设备”下)-没有更多,虽然-它只是在底部所显示的尖叫拍摄以上,即使在应用程序的后续运行..。

我认为我应该尝试“重新创建 AVD 的奇怪的,畸形的 config.ini”,但不知道采取什么步骤来实现这一点。

107737 次浏览

UPDATED 20/10/2022

If you are using Android Studio Dolphin | 2021.x.y you will find these folders:

  • in Windows should be in c:\user\yourname\AppData\Roaming\Google\AndroidStudioX.Y
  • in Linux should be in /home/yourname/.config/Google/AndroidStudioX.Y and /home/yourname/.local/share/Google/AndroidStudioX.Y
  • in Mac should be in ~/Library/Application Support/Google/AndroidStudio2021.X.Y

If you are using AndroidStudio Arctic Fox 2020.3 you will find these folders:

  • in Windows should be in c:\user\yourname\AppData\Roaming\Google\AndroidStudioX.Y
  • in Linux should be in /home/yourname/.config/Google/AndroidStudioX.Y and /home/yourname/.local/share/Google/AndroidStudioX.Y
  • in Mac should be in ~/Library/Application Support/Google/AndroidStudioX.Y

If you are using AndroidStudio 4.1/4.2 you will find these folders:

  • in Windows should be in c:\user\yourname\AppData\Roaming\Google\AndroidStudioX.Y
  • in Linux should be in /home/yourname/.config/Google/AndroidStudioX.Y and /home/yourname/.local/share/Google/AndroidStudioX.Y
  • in Mac should be in ~/Library/Application Support/Google/AndroidStudioX.Y

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

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

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

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

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

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)

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

~/Library/Preferences/AndroidStudio2.1/

that is, not a hidden dir.

On mac Sierra, Android studio 2.3

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

for Android Studio 4.2, Google has moved it to %appdata%\Roaming\Google\AndroidStudioPreview4.2

For Linux and Android Studio 4.2+, the location is:

/home/[username]/.config/Google/AndroidStudio4.1

assuming you are upgrading from version 4.1.

There is a single point of reference for the location of the settings folder for all Jetbrains IDE's for all OS's:

To migrate the settings look for the folder listed under Configuration directory

Contrary to JetBrains' documentation, but according to Configure Android Studio, the configuration is currently under a "Google" folder:

  • Windows: %APPDATA%\Google\<product><version>
  • Mac: ~/Library/Application Support/Google/<product><version>
  • Linux: ~/.config/Google/<product><version>

That's where I found them (the Mac variant).