如何设置在mac中设置ANDROID_HOME环境变量

时间:2017-08-21 11:24:29

标签: android ionic-framework ionic2

enter image description here

我设置了create .bash_profile文件并保存这些行:

export ANDROID_HOME=/Users/macbookpro/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

然后输入terminal:source~ / .bash_profile 如果我在终端输入此命令:echo $ ANDROID_HOME 我有正确的道路:

/Users/macbookpro/Library/Android/sdk

但如果我运行命令:

ionic cordova run android

在我的离子项目中,我收到了这个错误:

ERROR running one or more of the platforms: Android SDK not found. Make 
sure that it is installed. If it is not at the default location, set 
the ANDROID_HOME environment variable.
You may not have the required environment or OS to run this project

我应该怎么做!

0 个答案:

没有答案