Why ANDROID_HOME path is required Android Linux?

时间:2016-02-01 07:20:41

标签: android linux

I have one confusion about Android environment variable path. As we already are setting tools and platform-tools path for Android SDK. So, Why do we require to set ANDROID_HOME path as environment variable ? Is it replaced by tools and platform-tools path?

thanks,

2 个答案:

答案 0 :(得分:0)

某些脚本和构建工具需要访问SDK主路径(例如,获取平台文件夹),并且它们无法从路径环境变量获取此路径。

答案 1 :(得分:0)

ANDROID_HOME 通常是像.android这样的目录。它将存储调试密钥之类的内容。

 export ANDROID_HOME=~/.android 

您可以自动登录。只需将其添加到.bash_profile(下面是我的OS X 10.8.5机器)

 $ cat ~/.bash_profile

<强>的Android

export ANDROID_NDK_ROOT=/opt/android-ndk-r9
export ANDROID_SDK_ROOT=/opt/android-sdk
export JAVA_HOME=`/usr/libexec/java_home`
export ANDROID_HOME=~/.android