How to Set Path Environmental Variable for SDK in Windows?
In order to run appium automation tests, it is required to set path environmental variables to describe the path of android SDK folders. In addition, you also need to set ANDROID_HOME.
Set ANDROID_HOME and Path Variables
Prerequisite: Install different packages as required.
- 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.
- Click OK to close the dialog box.
- 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, as shown below.
- 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, as shown below.
- This ensures that the android is configured properly.