简体   繁体   English

Android SDK环境变量

[英]Android SDK Environment Variables

What are the differences in these Android SDK variables: 这些Android SDK变量有什么区别:

  • ANDROID_HOME ANDROID_HOME
  • ANDROID_SDK_HOME ANDROID_SDK_HOME
  • ANDROID_AVD_HOME ANDROID_AVD_HOME

and what is the page that google explains those variables?? 谷歌解释这些变量的页面是什么?

I think the page you are looking for is Environment Variables 我认为您要查找的页面是环境变量

ANDROID_HOME ANDROID_HOME

Is deprecated and you need to use ANDROID_SDK_ROOT instead. 已过时,您需要改用ANDROID_SDK_ROOT If you continue to use it, the following rules apply: If ANDROID_HOME is defined and contains a valid SDK installation, it's value is used instead of the value in ANDROID_SDK_ROOT . 如果继续使用它,则将遵循以下规则:如果已定义ANDROID_HOME并包含有效的SDK安装,则将使用它的值而不是ANDROID_SDK_ROOT中的值。 If ANDROID_HOME is not defined, the value in ANDROID_SDK_ROOT is used. 如果ANDROID_HOME没有定义,在值ANDROID_SDK_ROOT被使用。 If ANDROID_HOME is defined but, does not exist or does not contain a valid SDK installation, the value in ANDROID_SDK_ROOT is used instead. 如果定义了ANDROID_HOME ,但它不存在或不包含有效的SDK安装,则改用ANDROID_SDK_ROOT的值。

ANDROID_SDK_ROOT ANDROID_SDK_ROOT

Sets the path to the SDK installation directory. 设置SDK安装目录的路径。 Once set, the value does not typically change, and can be shared by multiple users on the same machine. 设置后,该值通常不会更改,并且可以由同一台计算机上的多个用户共享。

ANDROID_SDK_HOME ANDROID_SDK_HOME

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). 默认情况下,模拟器将配置文件存储在$HOME/.android/ (在Windows中为%username%/.android/ )和AVD数据存储在$HOME/.android/avd/ (在Windows中为%username%/.android/avd/ )。 You can override the defaults by setting the following environment variables. 您可以通过设置以下环境变量来覆盖默认值。 The emulator -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/ . emulator -avd <avd_name>命令按照$ANDROID_AVD_HOME$ANDROID_SDK_HOME/.android/avd/$HOME/.android/avd/中的值顺序搜索avd目录。

ANDROID_AVD_HOME ANDROID_AVD_HOME

Sets the path to the directory that contains all AVD-specific files, which mostly consist of very large disk images. 将路径设置为包含所有特定于AVD的文件的目录,该文件主要由非常大的磁盘映像组成。 The default location is $ANDROID_EMULATOR_HOME/avd/ . 默认位置为$ANDROID_EMULATOR_HOME/avd/ You might want to specify a new location if the default location is low on disk space. 如果默认位置磁盘空间不足,则可能要指定一个新位置。

I was looking for the same answer, but soon found out that most people programming for android do not know basic why and how and just follow the instruction given to them by a manager, blog, or manual until they manage to make an APK. 我一直在寻找相同的答案,但很快发现,大多数为android编程的人都不知道基本的原因和方式,仅遵循经理,博客或手册给他们的指示,直到他们设法制作了APK。 at least it is true in my organization 至少在我的组织中是这样

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM