如何设置'ANDROID_HOME'环境变量?

时间:2016-03-31 10:15:16

标签: android ionic-framework ubuntu-14.04

我完成了我的要求,我无法构建我的应用程序。它只是抛出一个错误:

Error: Failed to find 'ANDROID_HOME' environment variable. 
Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. 
Try update your 'PATH' to include path to valid SDK directory.

有谁能建议我如何纠正?

1 个答案:

答案 0 :(得分:2)

.bash_profile文件中包含以下行:

export ANDROID_HOME=/YOUR_PATH_TO/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=/usr/local/bin:$PATH