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.

  1. Right-click on ‘My Computer’ and select Properties. Go to Advanced system settings and select ‘Environmental Variables’ option.
  2. Under the User Variable table, click New to open New User Variable dialog.
  3. Put ANDROID_HOME as Variable name and provide the path of the SDK folder next to Variable value.
  4. Click OK to close the dialog box.image001
  5. Go to the folder where SDK has been installed.
  6. Inside the SDK folder look for ‘tools’ and ‘platform-tools’ folder.
  7. Copy the path for both tools and platform-tools.
  8. Open ‘Environmental Variables’ dialog box.
  9. Go to System Variables table and locate the Path variable.
  10. Edit the path variable from ‘Edit system Variables’ dialog box.
  11. Add the ‘tools’ and platform-tools’ folder’s full path, as shown below.image003
  12. Close the entire opened dialog box.
  13. This configures the Android. However, to check open the command prompt.
  14. Type the command ‘android’. This will open the Android SDK Manager dialog box, as shown below.image005
  15. This ensures that the android is configured properly.

You may also like: How to Install and Configure Java JDK to run Eclipse IDE for Creating Selenium Automation Scripts?


Get A Free Quote

11 thoughts on “How to Set Path Environmental Variable for SDK in Windows?

    • Try running android sdk manager from android studio. In that you will find a setting by the name of “Path Variable” inside Appearance and Behavior > System Settings. Inside that, click the “+” button in the top right hand corner of the window. Then, in the new window that appears, enter the variable name as ANDROID_HOME and in the path option, select the location where the sdk has been installed. Then, try running the android command from the command prompt. It should work properly.

  1. i tried below commands after set a path variable as shown above,
    ‘android’, ‘android.bat’ and ‘adb’

    Got error only.
    Windows 10 laptop

    Kindly help me

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.