Getting started with Android Development (whether using Cordova or Native) can be a little tricky for complete beginners. One hurdle is the configuration of Environment Variables required to execute all Android commands easily using command prompt.
Here is how to configure all environment variables in Windows that you need to build an Android App. I am assuming that you have already downloaded and installed the latest version of Android Studio from here.
- Right-click on ‘My Computer’ and select Properties.
- Go to Advanced system settings and select ‘Environmental Variables’ option.
- Under the User Variable table, click New to open New User Variable dialog.
- Put ANDROID_HOME as Variable name and provide the path of the SDK folder next to Variable value.
- Go to the folder where SDK has been installed.
- Inside the SDK folder look for ‘tools’ and ‘platform-tools’ folder.
- Copy the path for both tools and platform-tools.
- Open ‘Environmental Variables’ dialog box.
- Go to System Variables table and locate the Path variable.
- Edit the path variable from ‘Edit system Variables’ dialog box.
- Add the ‘tools’ and platform-tools’ folder’s full path at the end of the path string. Make sure that all paths are separated by semi-colons.
- Close the entire opened dialog box.
- This configures the Android. However, to check open the command prompt.
- Type the command ‘android’. This will open the Android SDK Manager dialog box,
That is all. Feel free to comment below if you face any problems.