移动默认 AVD 配置文件夹 (.android)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3109473/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Moving default AVD configuration folder (.android)
提问by Dariusz Bacinski
After installation of Android SDK, there was created .android
folder on the E:\
drive. As far as I know this is the default folder of Android Virtual Devices for configuration files.
安装 Android SDK 后,.android
在E:\
驱动器上创建了文件夹。据我所知,这是 Android Virtual Devices 配置文件的默认文件夹。
How can I move .android
folder to a different location?
如何将.android
文件夹移动到其他位置?
(eg. from E:\.android
to E:\Android\.android
)
(例如,从E:\.android
到E:\Android\.android
)
回答by Dariusz Bacinski
I've found the answer.
我找到了答案。
- Move
.android
folder toE:\Android
- Create environment variable called
ANDROID_SDK_HOMEand set its value to
E:\Android
- 将
.android
文件夹移动到E:\Android
- 创建名为ANDROID_SDK_HOME 的环境变量
并将其值设置为
E:\Android
Setting the environment variable on Windows XP or Windows 7:
在 Windows XP 或 Windows 7 上设置环境变量:
- Right-click on My Computer and choose "Properties"
- Click the "Advanced" tab
- Click the button "Environment Variables".
- Add New variable
- 右键单击我的电脑并选择“属性”
- 单击“高级”选项卡
- 单击“环境变量”按钮。
- 添加新变量
回答by RonTLV
By default, the emulator stores configuration files under $HOME/.android/
and AVD data under $HOME/.android/avd/
. You can override the defaults by setting the following environment variables.
默认情况下,模拟器将配置文件$HOME/.android/
存储在$HOME/.android/avd/
. 您可以通过设置以下环境变量来覆盖默认值。
The emulator searches the avd directory in the order of the values in $ANDROID_AVD_HOME
, $ANDROID_SDK_HOME/.android/avd/
, and $HOME/.android/avd/
.
仿真器搜索中值的顺序AVD目录$ANDROID_AVD_HOME
,$ANDROID_SDK_HOME/.android/avd/
和$HOME/.android/avd/
。
This page provides the list of environmental variables supported by android studio: https://developer.android.com/studio/command-line/variables
本页提供了android studio支持的环境变量列表:https: //developer.android.com/studio/command-line/variables
回答by robbash
The path set in ANDROID_SDK_HOME
must exist. Otherwise the default path will be chosen.
But it is not necessary to include .android
. The AVD Manager creates a .android
folder, if not found in ANDROID_SDK_HOME
.
设置的路径ANDROID_SDK_HOME
必须存在。否则将选择默认路径。但没有必要包括.android
. AVD 管理器会创建一个.android
文件夹,如果在ANDROID_SDK_HOME
.
回答by shmoo
In addition to the answer provided by Dariusz Bacinski
, you have to include the .android
folder in the ANDROID_SDK_HOME
path. It was not working for me if I did not include the .android
folder.
除了 提供的答案外Dariusz Bacinski
,您还必须.android
在ANDROID_SDK_HOME
路径中包含文件夹。如果我不包含该.android
文件夹,它对我不起作用。