Unfortunately, the installation of JDK, Maven or Ant is not defined in our machine the relevant variables for each application (JAVA_HOME, ANT_HOME and M2_HOME). Therefore these variables will need to be created manually.
After installing all components (Java, Ant, Maven and Android), set environment variables in your machine.
In the “System Properties” window, “Advanced Options” tab and “Environment Variables” option will create the necessary variables for the above components: Java Ant, Maven and Android.
JAVA_HOME
- Variable name “JAVA_HOME” and as the value of the same “C:\java\Jdk1.7.0_79”
ANT_HOME
- Variable name “ANT_HOME” and as the value of the same “C:\apache-ant-1.9.6”
MAVEN_HOME
- Variable name “M2_HOME” and as the value of the same “C:\apache-maven.3.3.9”
ADD to PATH - Add binaries to environment variable PATH. The following text string to add to the end of the content of the variable PATH: “;%JAVA_HOME%\bin;%M2_HOME%\bin;%ANT_HOME%\bin”.
ANDROID_HOME
- Set environment variable ANDROID_HOME to the path of your installed Android SDK and add $ANDROID_HOME/tools as well as $ANDROID_HOME/platform-tools to your $PATH. (or on Windows %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools).
ANDROID_HOME to PATH - Add binaries to environment variable PATH. The following text string to add to the end of the content of the variable PATH: “;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform_tools”.
Warning: Do not delete the contents of the PATH variable, just add the new text string.