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
For Mac OS X:
export ANDROID_HOME=/<installation location>/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
For Windows:
set ANDROID_HOME=C:\ installation location \android-sdk
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
Taken from this installation guide.
It's is mostly with missing andriod SDK. for this issue and "JAVA_HOME" error following solution worked for me... hole day saved after following steps.
To build and run apps, you need to install SDKs for each platform you wish to target. Alternatively, if you are using browser for development you can use browser platform which does not require any platform SDKs.
To check if you satisfy requirements for building the platform:
$ cordova requirements
Requirements check results for android:
Java JDK: installed .
Android SDK: installed
Android target: installed android-19,android-21,android-22,android-23,Google Inc.:Google APIs:19,Google Inc.:Google APIs (x86 System Image):19,Google Inc.:Google APIs:23
Gradle: installed
Requirements check results for ios:
Apple OS X: not installed
Cordova tooling for iOS requires Apple OS X
Error: Some of requirements check failed
You just need to type a command in flutter_console.bat
type flutter config --android-sdk <path-to-your-android-sdk-path>
for windows:
Right click on My computer -> properties -> Advanced system setting -> Environment Variables Edit Path on system variables to ;\yourSdkHome\tools;\yourSdkHome\platform-tools.
Then Close your cmd prompt and reopen.
Thats it.
For Windows I just had to add an env variable pointing to the SDK folder. Done! (The accepted answer didn´t work for me)