I\'m trying to install PhoneGap and I\'m getting the following error:
Error: ANDROID_HOME is not set and "android" command not in your PATH. Yo
If nothing else works, make sure that you have correct permissions and ownership set up during building. A quick fix can be:
sudo chown -R <you>:<your_group> *
sudo chmod -R 755 *
This is what I just tried to make it work. I was in:
os x Yosemite version 10.10.2
cordova version 4.2.0
android studio 1.0.1
Java SE Development Kit 7
set path:
# on ~/.zshrc file (open a text editor)
export ANDROID_HOME="/Users/<user>/Library/Android/sdk/"
export ANDROID_TOOLS="/Users/<user>/Library/Android/sdk/tools"
export ANDROID_PLATFORM_TOOLS="/Users/<user>/Library/Android/sdk/platform-tools"
PATH=$PATH:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS
reopen terminal
install "android-19" from android SDK manager
$ android
# pick "SDK Platform Android 4.4.2, API 19"
and then go to a Cordova-based project directory
$ ionic platform add android
I also faced this same issue, I got a solution with this.
I did the following steps :
close your current cmd, and restart it run flutter doctor
this should work on windows
ANDROID_HOME
in the Variable name field.C:\Program Files (x86)\Android\android-sdk
in the Variable value field.C:\Program Files (x86)\Android\android-sdk\platform-tools
in the filed.C:\Program Files (x86)\Android\android-sdk\tools
in the field.That's all you need to do.