I am having problem to build android with Cordova, when I execute cordova build android
, I receive this error:
Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
I have do this to fix it:
sudo nano ~/.bash_profile
and add this line:
export PATH=${PATH}:/Users/myname/Library/Android/sdk/platform-tools:/Users/myname/Library/Android/sdk/tools
then this:
source ~/.bash_profile
but I get again that error when I build, how can I fix it?
UPDATE:
This is the line I Added in the bash:
export PATH=${PATH}:/Users/myname/Library/Android/sdk/platform-tools:/Users/myname/Library/Android/sdk/tools
export ANDROID_HOME=/Users/myname/Library/Android/sdk
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…