Android SDK环境变量 [英] Android SDK Environment Variables
问题描述
这些Android SDK变量有何区别:
What are the differences in these Android SDK variables:
- ANDROID_HOME
- ANDROID_SDK_HOME
- ANDROID_AVD_HOME
Google在解释这些变量的页面是什么?
and what is the page that google explains those variables??
推荐答案
I think the page you are looking for is Environment Variables
ANDROID_HOME
已弃用,您需要改用
ANDROID_SDK_ROOT
.如果您继续使用它,则适用以下规则:如果定义了ANDROID_HOME
并包含有效的SDK安装,则会使用它的值而不是ANDROID_SDK_ROOT
中的值.如果未定义ANDROID_HOME
,则使用ANDROID_SDK_ROOT
中的值.如果定义了ANDROID_HOME
,但它不存在或不包含有效的SDK安装,则将使用ANDROID_SDK_ROOT
中的值.
Is deprecated and you need to use
ANDROID_SDK_ROOT
instead. If you continue to use it, the following rules apply: IfANDROID_HOME
is defined and contains a valid SDK installation, it's value is used instead of the value inANDROID_SDK_ROOT
. IfANDROID_HOME
is not defined, the value inANDROID_SDK_ROOT
is used. IfANDROID_HOME
is defined but, does not exist or does not contain a valid SDK installation, the value inANDROID_SDK_ROOT
is used instead.
ANDROID_SDK_ROOT
设置SDK安装目录的路径.设置后,该值通常不会更改,并且可以由同一台计算机上的多个用户共享.
Sets the path to the SDK installation directory. Once set, the value does not typically change, and can be shared by multiple users on the same machine.
ANDROID_SDK_HOME
默认情况下,仿真器将配置文件存储在
$ HOME/.android/
(在Windows中为%username%/.android/
)下,并将AVD数据存储在下$ HOME/.android/avd/
(在Windows中为%username%/.android/avd/
).您可以通过设置以下环境变量来覆盖默认值.emulator -avd< avd_name>
命令按照$ ANDROID_AVD_HOME
,$ ANDROID_SDK_HOME/.android/avd/中的值顺序搜索avd目录.代码>和
$ HOME/.android/avd/
.
By default, the emulator stores configuration files under
$HOME/.android/
(%username%/.android/
in windows) and AVD data under$HOME/.android/avd/
(%username%/.android/avd/
in windows). You can override the defaults by setting the following environment variables. Theemulator -avd <avd_name>
command searches the avd directory in the order of the values in$ANDROID_AVD_HOME
,$ANDROID_SDK_HOME/.android/avd/
, and$HOME/.android/avd/
.
ANDROID_AVD_HOME
设置包含所有特定于AVD的文件的目录的路径,这些文件主要由非常大的磁盘映像组成.默认位置为
$ ANDROID_EMULATOR_HOME/avd/
.如果默认位置磁盘空间不足,则可能要指定一个新位置.
Sets the path to the directory that contains all AVD-specific files, which mostly consist of very large disk images. The default location is
$ANDROID_EMULATOR_HOME/avd/
. You might want to specify a new location if the default location is low on disk space.
我一直在寻找相同的答案,但是很快发现,大多数为android编程的人都不知道基本的原因和方式,仅遵循经理,博客或手册给他们的指示,直到他们进行管理制作一个APK.至少在我的组织中是这样
这篇关于Android SDK环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!