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 those who are working with Ionic Framework on windows and doesn't have andorid studio installed on their PCs, you must have either download Android Studio or at list download the SDK Manager.
If you choose the SDK Manager option you have to set the path for the Enviroment Variable:
Variable name: ANDROID_HOME
, Variable value: the path where you installed the android SDK, in my case is, C:\Android\android-sdk
.
You have to add the variable to the Path variable system by adding this:
;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;
.
Then if you got the "JDK error" just download it from the Oracle website and create a system variable like the Android SDK:
Variable name: JAVA_HOME
, Variable value: the path where you installed the JDK, in my case is, C:\Program Files\Java\jdk1.8.0_144
. Then add it to the Path variable system by adding ;%JAVA_HOME%\bin
.
Then if you got the "Gradle error" just fallow the installations steps on the official website of gradle.
Finally you can continue to creating your ionic app's apk.
Note: you have to reopen the cmd window several times or restart your pc after making those changes. Hope this work for you.