- How To Set Android SDK Path In Windows And Mac
- 1. Configure Android SDK Variable In Windows.
- 1.1 Get Android SDK Install Directory Path.
- 1.2 Set %ANDROID_HOME% and %Path% System Environment Variable.
- 2. Configure Android SDK Variable In macOS.
- Как установить переменную среды ANDROID_SDK_HOME?
- How to set ANDROID_HOME path in windows environment? [closed]
- 1 Answer 1
- Not the answer you’re looking for? Browse other questions tagged android android-studio or ask your own question.
- Related
- Hot Network Questions
- How do I set ANDROID_SDK_HOME environment variable?
- 10 Answers 10
- ANDROID_HOME
- ANDROID_SDK_ROOT
- ANDROID_NDK_ROOT
- ANDROID_SDK_HOME
- ANDROID_EMULATOR_HOME
- ANDROID_AVD_HOME
- JDK_HOME and JAVA_HOME
- Software testing tutorials and automation
- Pages
- Set ANDROID_HOME and Path Environment Variables For SDK In Windows
- Set ANDROID_HOME Variable
- 21 comments:
How To Set Android SDK Path In Windows And Mac
After you installed android studio, you still need to configure some android SDK environment variables then you can use it easily. This article will tell you how to correctly configure Android SDK environment variables such as ANDROID_HOME, PATH on Windows and macOS.
1. Configure Android SDK Variable In Windows.
1.1 Get Android SDK Install Directory Path.
Before you can configure it, you should first get the android SDK install directory follow below steps.
- Open android studio, click File —> Settings menu item in the top men bar.
- Expand Appearance & Behavior —>System Settings —>Android SDK menu item on the left side of the popup window. Then you can find the Android SDK Location directory path on the right side ( in this example, the Android SDK location path is C:\Users\Jerry\AppData\Local\Android\Sdk ), remember it.
1.2 Set %ANDROID_HOME% and %Path% System Environment Variable.
- Right-click the computer icon in Windows file explorer left side, click Properties menu item in the popup menu list. This will open the windows system configuration window.
- Click the Advanced system settings link on left panel, it will popup the System Properties window, click the Environment Variables button to open Environment Variables window.
- Click the New… button to add a new system variable, input ANDROID_HOME as the variable name, and input the Android SDK location directory path ( such as C:\Users\Administrator\AppData\Local\Android\Sdk ) as the variable value.
- Select variable Path and click Edit button and add ;%ANDROID_HOME%\tools;%ANDROID_HOME%\tools\bin;%ANDROID_HOME%\platform-tools at the end of its value. Please note the ; must be English character otherwise it will not take effect .
- Click OK to close the system environment variables settings window, open a dos window, type command adb in it. If you see output like below that means the android SDK path variable has been configured successfully.
2. Configure Android SDK Variable In macOS.
- Open Android Studio on macOS, then click Android Studio —> Preferences menu item at the left top toolbar.
- Input search keyword sdk in the search box of the popup Preferences dialog window left side.
- It will focus on the Android SDK menu item on the left side, and you can get the Android SDK Location directory path value on the right side Android SDK Location text box.
- Generally, the Android SDK is installed in the /Users/user-name/Library/Android/sdk folder on macOS.
- If you can not find the above folder in macOS finder or terminal, this is because the Library folder is a hidden folder by default, you should make the hidden folder visible by executing the command $ defaults write com. apple . finder AppleShowAllFiles TRUE in a macOS terminal window ( please read article How To Show Hidden Files In Mac OS Finder And Select Hidden Files In Html Upload File Form ).
- You can also see the hidden Library folder by opening a macOS Finder window, then click Go —> Go to Folder… menu item, and input
/Library in the popup dialog input text box, then click Go button.
Как установить переменную среды ANDROID_SDK_HOME?
Я работаю с Eclipse в Windows 7, x64. Я получаю сообщение об ошибке при запуске пакета ADT для разработки Android:
Ошибка: ошибка разбора AVD
Не удалось получить домашний каталог Android SDK.
Убедитесь, что настроена переменная окружения ANDROID_SDK_HOME.
Я знаю, в чем проблема. Это потому, что связано с неправильным каталогом C: users: .
Как установить эту переменную среды android_sdk_home в соответствующий каталог?
Пожалуйста, дайте мне точные шаги, как это сделать, например open cmd.exe , введите это и т. Д. Я не в этом разбираюсь, я никогда не закодировал что-либо еще на других сайтах.
Если вы столкнулись с такой же ошибкой, выполните следующие шаги:
- Открыть панель управления
- Затем перейдите в Систему
- Затем перейдите в «Изменить переменные среды» пользователя
- Затем нажмите «Создать новые переменные среды».
- Создайте новую переменную ANDROID_SDK_HOME
- Установите его значение в свой Android-каталог, например C:/users/ /.android
Это сработало для меня:
- Открыть панель управления
- Нажмите «Система»
- Затем перейдите в «Изменить переменные среды»
- Затем нажмите «Создать новые переменные среды».
- Создайте новую переменную с именем ANDROID_HOME путь C: \ Android \ sdk
Из командной строки:
Set ANDROID_SDK_HOME = C: \ [где бы ни находилась ваша папка sdk]
Должен сделать трюк.
Откройте свой адт и откройте настройки, а затем измените каталог с помощью вашего каталога sdk, это может помочь вам следить за ссылкой на ссылку pic
Также требуется установка Android SDK. Android SDK предоставляет вам библиотеки API и инструменты разработчика, необходимые для создания, тестирования и отладки приложений для Android.
Кордова требует, чтобы переменная среды ANDROID_HOME была установлена. Это должно указывать на [ANDROID_SDK_DIR]\android-sdk (например, c: \ android \ android-sdk).
Затем обновите свой PATH, чтобы включить в эту папку инструменты / и платформы-инструменты / папку. Таким образом, используя ANDROID_HOME , вы должны добавить как %ANDROID_HOME%\tools и %ANDROID_HOME%\platform-tools .
How to set ANDROID_HOME path in windows environment? [closed]
Want to improve this question? Update the question so it’s on-topic for Stack Overflow.
Closed 1 year ago .
Unable to set How to set ANDROID_HOME path in windows environment.
Please provide the steps.
1 Answer 1
Steps already available on Google
- Click Start.
- Right-click Computer, and then select Properties.
- Click Advanced system settings.
- On the Advanced tab, click Environment Variables.
- Under User variables, click New.
- For Variable name, type the following value: ANDROID_HOME For Variable value, type the path to the parent directory where your Android SDK is installed.
- For instance: C:\Android\android-sdk Click OK until you have closed all dialog boxes. Do not click Cancel.
- Restart your computer.
Not the answer you’re looking for? Browse other questions tagged android android-studio or ask your own question.
Related
Hot Network Questions
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.4.16.39093
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
How do I set ANDROID_SDK_HOME environment variable?
I’m working with Eclipse on Windows 7, x64. I’m getting an error when running ADT bundle of android development:
Error: Error parsing the AVDs
Unable to get the Android SDK home directory.
Make sure the environment variable ANDROID_SDK_HOME is set up.
I know what the issue is. Is it because it is linked to a wrong directory C:users.
How do I set this environment variable android_sdk_home to the proper directory?
10 Answers 10
ANDROID_HOME
Deprecated (in Android Studio), use ANDROID_SDK_ROOT instead.
ANDROID_SDK_ROOT
Installation directory of Android SDK package.
Example: C:\AndroidSDK or /usr/local/android-sdk/
ANDROID_NDK_ROOT
Installation directory of Android NDK package. (WITHOUT ANY SPACE)
Example: C:\AndroidNDK or /usr/local/android-ndk/
ANDROID_SDK_HOME
Location of SDK related data/user files.
Example: C:\Users\ \.android\ or
ANDROID_EMULATOR_HOME
Location of emulator-specific data files.
Example: C:\Users\ \.android\ or
ANDROID_AVD_HOME
Location of AVD-specific data files.
Example: C:\Users\ \.android\avd\ or
JDK_HOME and JAVA_HOME
Installation directory of JDK (aka Java SDK) package.
Note: This is used to run Android Studio(and other Java-based applications). Actually when you run Android Studio, it checks for JDK_HOME then JAVA_HOME environment variables to use.
/.android/avd directory. Any idea what could be the issue? I ended up using a symlink from
/.android to my desired directory. – Joshua Pinter Apr 7 ’18 at 16:33
/.android – Zack Aug 13 ’19 at 15:15
If you face the same error, here are the step by step instructions:
- Open control panel
- Then go to System
- Then go to Change Environment Variables of the User
- Then click create a new environment variables
- Create a new variable named ANDROID_SDK_HOME
- Set its value to your Android directory, like C:/users/ /.android
/.android/ on Linux, which corresponds to %USERPROFILE%\.android on Windows. The fact is that, you don’t need to specify the .android subfolder. On Windows, you just set ANDROID_SDK_HOME to whatever folder it resides in. So, in the OP’s case, it would be set to C:\Users\ or %UserProfile% and for others, wherever you like. The only caveat is that the (parent) folder must exist. – Frank May 20 ’16 at 4:30
This worked for me:
- Open control panel
- click System
- Then go to Change Environment Variables
- Then click create a new environment variables
- Create a new variable named ANDROID_HOME path C:\Android\sdk
Copy your SDK path and assign it to the environment variable ANDROID_SDK_ROOT
Refer pic below:
open your adt and open preferences, then modify directory with your sdk dir, it may help you follow the pic link indication
Installing the Android SDK is also necessary. The Android SDK provides you the API libraries and developer tools necessary to build, test, and debug apps for Android.
Cordova requires the ANDROID_HOME environment variable to be set. This should point to the [ANDROID_SDK_DIR]\android-sdk directory (for example c:\android\android-sdk).
Next, update your PATH to include the tools/ and platform-tools/ folder in that folder. So, using ANDROID_HOME , you would add both %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools .
Although the above answers mostly get them right, there is one slight issue with them all.. Follow these steps and you are good to go
- Right click on This PC -> Properties
- On the left pane select «Advanced System Settings»
- On the new window select -> Advanced tab
- Click on the «Environment Variables» button
- On the first top section click on the «New» button
set variable name -> ANDROID_HOME
set variable value -> the custom location of the Android SDK
- Now click on the newly created variable name and in the box below select «Path» and click on the Edit button
- Now click on New and paste the location of the «platform-tools»
- Again click on New and paste the location of the «tools» You can find the locations of the above platform-tools and tools — they are generally inside the Android SDK folder
- MOST IMPORTANT OF ALL.
save all those by clicking ok If you are using the terminal(cmd) close it and open it again
Software testing tutorials and automation
A blog on Selenium tutorial, Selenium webdriver tutorial, Selenium IDE tutorial, Appium Tutorial, Selenium Grid Tutorial, Jmeter Tutorial.
Pages
Set ANDROID_HOME and Path Environment Variables For SDK In Windows
PREREQUISITES : FIRST 3 STEPS of appium automation software tutorial should be completed.
Set ANDROID_HOME Variable
- Open » Environment Variables» dialog from win start menu -> Right click on My Computer -> Select properties -> Advanced system settings -> Environment Variables button from Advanced tab. You can view detailed steps to open Environment Variables dialog in THIS POST.
- Click on New button under User Variable table. It will open New User Variable dialog.
- Set Variable Name = ANDROID_HOME and Variable value = E:\SDK (Path of SDK folder). Path can be different for you as per your SDK folder location as described in previous post.
- Click on OK button to close New User Variable dialog as shown in bellow image.
That means android is configured properly in your system.
Now ANDROID_HOME and Path Environment Variables are set for android SDK in windows environment. So android environment is configured and ready to use with appium to execute software automation tests. Next post will describe you how to integrate SDK with eclipse using Eclipse ADT Plugin to use android SDK with eclipse.
21 comments:
Thanks for the post its really help full for initial android user
Thank you for your help but i have an issue that is i do not find the sdk path in my computer. I want this setup for an ionic app create android platform and generate apk file. I also installed in my computer android studio.
Please help me to find the sdk path. I’m getting the error ANDROID_HOME veriable not setup, setup it manually.
u have to add JAVA_HOME variable also along with ANDROID_HOME to have proper functionality.
u have to add JAVA_HOME variable also along with ANDROID_HOME to have proper functionality.
I’m getting ANDROID_HOME variable not setup setup it manually to generate a apk from a ionic framework project. i did not find the sdk path in my computer but i also installed android studio in my computer. Please help me.
You are developing project means you are developer and asking for help regarding deploy from a testing background funny.
I am answering late but hope someone will find it useful :
If you have already installed android studio then you will find your sdk in user appdata hidden folder.
thanks for the help!
‘android’ is not recognised as internal or external command,operable program or batch file- message is displayed in command prompt. I had set the path correctly, But don’t know what is the problem can you please help me with it??
maybe you have spaces in your path, for example if your sdk in Program files folder.
you should set the correct path, use such scheme:
Progra
1 = ‘Program Files’
Progra
2 = ‘Program Files(x86)’
it is for windows x64
maybe you have some spaces in your path, for example your sdk is located in «Program files».
use such scheme:
Progra
1 = ‘Program Files’
Progra
2 = ‘Program Files(x86)’
it’s for windows x64
I have also faced the same error. But once after providing ‘SDK path’ in the System variables ‘Path’. The error is cleared
thanks for help
By far the most helpful page I have found about setting up all the variables and paths for android 🙂
I run the command prompt I got the sdk manager, but I also got «this system cannot find the specified path», let me know what I have to do solve this issue
The «android» command is depercated
For manual sdk, avd, and project management, please use android studio.
For command-line tools, use tools\bin\sdk manager.bat
And tools\bin\avdmanager.bat
Same issue, What is the solution for this ?