How to Set Path Environmental Variable for SDK in Windows? (2024)

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.

Step 1. Right-click on ‘My Computer’ and select Properties. Go to Advanced system settings and select ‘Environmental Variables’ option.

Step 2. Under the User Variable table, click New to open New User Variable dialog.

Step 3. Put ANDROID_HOME as Variable name and provide the path of the SDK folder next to Variable value.

Step 4. Click OK to close the dialog box.

How to Set Path Environmental Variable for SDK in Windows? (1)

Step 5. Go to the folder where SDK has been installed.

Step 6. Inside the SDK folder look for ‘tools’ and ‘platform-tools’ folder.

Step 7. Copy the path for both tools and platform-tools.

Step 8. Open ‘Environmental Variables’ dialog box.

Step 9. Go to System Variables table and locate the Path variable.

Step 10. Edit the path variable from ‘Edit system Variables’ dialog box.

Step 11. Add the ‘tools’ and platform-tools’ folder’s full path, as shown below.

How to Set Path Environmental Variable for SDK in Windows? (2)

Step 12. Close the entire opened dialog box.

Step 13. This configures the Android. However, to check open the command prompt.

Step 14. Type the command ‘android’. This will open the Android SDK Manager dialog box, as shown below.

How to Set Path Environmental Variable for SDK in Windows? (3)

Step 15. This ensures that the android is configured properly.

Also Read: How to Install and Configure Java JDK to run Eclipse IDE for Creating Selenium Automation Scripts?

How to Set Path Environmental Variable for SDK in Windows? (2024)

FAQs

How do you set the path for the environment variable for JDK? ›

Steps
  1. Choose Start -> Settings -> Control Panel.
  2. Double-click System.
  3. On Microsoft Windows NT, select the Environment tab. ...
  4. Click Path in the User Variables and System Variables.
  5. Click Edit. ...
  6. Add the location of the JDK bin directory to the PATH statement. ...
  7. Click OK to successively close each window.

How do I set Environment Variables in Windows path? ›

Windows
  1. In Search, search for and then select: System (Control Panel)
  2. Click the Advanced system settings link.
  3. Click Environment Variables. ...
  4. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. ...
  5. Reopen Command prompt window, and run your java code.

How to set Sdk path in local properties? ›

  1. Go to your React-native Project -> Android.
  2. Create a file local.properties.
  3. Open the file.
  4. paste your Android SDK path like below in Windows sdk. dir = C:\\Users\\USERNAME\\AppData\\Local\\Android\\sdk in macOS sdk. ...
  5. Replace USERNAME with your user name.
  6. Now, Run the react-native run-android in your terminal.
Dec 23, 2014

How do you set an environment variable? ›

Set environment variables in the System Control Panel
  1. Open the System Control Panel.
  2. Select System.
  3. Select Advanced System Settings.
  4. Go to the Advanced tab.
  5. Select Environment Variables....
  6. Make your changes.

How do you include environment variable path? ›

To add a path to the PATH environment variable
  1. On the Start menu, right-click Computer.
  2. On the context menu, click Properties.
  3. In the System dialog box, click Advanced system settings.
  4. On the Advanced tab of the System Properties dialog box, click Environment Variables.
Oct 20, 2016

How to set environment variable for JDK in Windows? ›

Windows:
  1. In the System Properties window, click on the "Environment Variables" button.
  2. In the "System Variables" section, click on the "New" button.
  3. Set the "Variable name" as JAVA_HOME .
  4. In the "Variable value" field, enter the path to the JDK installation directory. ...
  5. Click "OK" to save the changes.
Jun 8, 2023

How to set JDK path in Environment Variables in Windows 10? ›

Setting Java Path in Windows
  1. Select the Advanced tab and then click environment variables.
  2. In the system, variables click the New button. ...
  3. Now in the system variables go to the path and click the edit button.
  4. Click the New button.
  5. Now add the following path: %JAVA_HOME%\bin.
Sep 8, 2022

How do I find JDK path in Windows? ›

Configure Java Path
  1. Go to 'C:\Program Files\Java' OR.
  2. Go to 'C:\Program Files (x86)\Java If there is not a folder called jdk with some numbers you need to install the jdk.
  3. From the java folder go to jdk\bin and there should be a java.exe file. ...
  4. You can also click in the address bar and copy the path from there.

How to set environment variable PATH in Windows using CMD? ›

Edit %PATH% Variable in Win 10
  1. Click on Start Button and type cmd in the search box. ...
  2. To add file or directory path to your User %PATH% environment variable type the command `pathman /au` followed by the path to the directory or file, such as: `pathman /au c:\Programs\Python35`
Jan 13, 2020

How to set environment variable in Windows cmd? ›

Follow the steps to set environment variables using the Windows GUI:
  1. Press Windows + R to open the Windows Run prompt.
  2. Type in sysdm. ...
  3. Open the Advanced tab and click on the Environment Variables button in the System Properties window.
  4. The Environment Variables window is divided into two sections.
Jan 26, 2021

How to set a PATH in cmd? ›

How to set a path in a command prompt?
  1. Open the Control Panel.
  2. Click System and Security.
  3. Click System.
  4. Click Advanced system settings.
  5. In the System Properties dialog box, click the Environment Variables button.
  6. In the Environment Variables dialog box, under System variables, select the Path variable and click Edit.
Oct 21, 2023

How to add SDK Manager to PATH? ›

Or add it to env path by following these steps:
  1. Search and Open "Edit this systems environment variables".
  2. Click on Environment Variables at the bottom.
  3. Select and Edit Path variable.
  4. Add a semicolon if one doesn't exists.
  5. Paste the folder path such as "C:\Path_To_Android_Sdk\sdk\tools\bin"
  6. Save and exit the windows.
Apr 16, 2020

Where is the default PATH for .NET SDK? ›

Typically, the Framework SDK is installed at C:\Program Files\Microsoft.NET\SDK\v2.

What is a SDK file? ›

A software development kit (SDK) is a set of platform-specific building tools for developers. You require components like debuggers, compilers, and libraries to create code that runs on a specific platform, operating system, or programming language. SDKs put everything you need to develop and run software in one place.

How to set path environmental variable for Sdk in Linux? ›

Setting or changing the ANDROID_HOME path in Linux operating systems
  1. Open the file for editing.
  2. Search for the attribute ANDROID_HOME.
  3. Change the value of the attribute ANDROID_HOME to <user-home>/Android/Sdk . Note: You must point to the directory where you installed the Android SDK components. ...
  4. Save and close the file.

How to specify Android SDK path? ›

Click on Appearance and Behavior option > System Settings options and then click on the Android SDK option to get to see the below screen. Inside this screen, you will get to see your SDK path. You can update your SDK path by clicking on the Edit option.

Top Articles
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 5908

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.