How To Set Environment Variable For Android Studio
Afterward you installed android studio, you lot even so need to configure some android SDK environment variables so you can use them easily. This commodity will tell yous how to correctly configure Android SDK environment variables such as ANDROID_HOME, PATH on both Windows and macOS.
i. Configure Android SDK Variable In Windows.
1.1 Become Android SDK Install Directory Path.
- Before you can configure information technology, you should first become the android SDK install directory following the steps below.
- Open android studio, click File —> Settings menu particular in the top menu bar.
- Expand Appearance & Beliefs —> System Settings —> Android SDKmenu detail on the left side of the popup window. And 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 information technology.
1.2 Gear up %ANDROID_HOME% and %Path% System Environment Variable.
- Right-click the figurer icon in Windows file explorer left side, click Properties menu item in the popup card list. This volition open up the windows system configuration window.
- Click the Advanced organisation settings link on the left console, it will popup the Organisation Properties window, click the Environment Variables button to open the Environment Variableswindow.
- Click the New…button to add a new organisation variable, input ANDROID_HOME as the variable name, and input the Android SDK location directory path ( such as C:\Users\Ambassador\AppData\Local\Android\Sdk ) as the variable value.
- Select variable Path and click Edit push button and add together ;%ANDROID_HOME%\tools;%ANDROID_HOME%\tools\bin;%ANDROID_HOME%\platform-tools at the end of its value. Please notation the ; must be English character otherwise, it will non have outcome.
- Click OK to shut the system surround variables settings window, open a dos window, type command adb in it. If yous come across output like below that means the android SDK path variable has been configured successfully.
C:\Users\Ambassador>adb Android Debug Span version 1.0.39 Version 0.0.i-4500957 Installed equally C:\Users\Administrator\AppData\Local\Android\Sdk\platform-tools\adb .exe
two. Configure Android SDK Variable In macOS.
- Open Android Studio on macOS, and then click Android Studio —> Preferences menu detail at the left tiptop 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 y'all can get the Android SDK Location directory path value on the right side Android SDK Location text box.
- More often than not, the Android SDK is installed in the /Users/user-name/Library/Android/sdk folder on macOS.
- If yous can not notice the above folder in macOS finder or last, this is because the Library folder is a subconscious folder by default, you should make the hidden folder visible past 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 Grade ). - You can also see the hidden Library folder by opening a macOS Finder window, and then click Go —> Get to Folder… menu item, and input ~/Library in the popup dialog input text box, then click Become push.
- This is also another method to show the hidden Library binder, open a macOS Finder window, click Go —> Home carte du jour item. Right-click the home folder, then click the Show View Options menu item in the popup menu list. Bank check the Bear witness Library Folder checkbox.
- Apply nano to create or edit user fustigate profile in user domicile directory.
$ nano .bash_profile.
- Add ANDROID_HOME and PATH environment variable in user bash contour.
export ANDROID_HOME=/Users/Jerry/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin export PATH=$PATH/:$ANDROID_HOME/platform-tools
- Make the added system environment take effect.
$ source .bash_profile
- Now open a terminal and run adb, you should also see something output like in windows.
3. How To Download And Install Android SDK Control Line Tool Manually.
- If y'all do not need Android Studio, and you just want to use android SDK command-line tools simply, it is very like shooting fish in a barrel likewise.
- Go to the android SDK command-line tools download page and download the related aught files.
- Unzip the naught file to a local binder for example C:\android-sdk.
- Now when you start the Android Studio for the adjacent time, it will let yous select the android SDK location folder, just select the to a higher place binder.
- You lot can also change the android SDK location binder in the Android Studio Settings dialog.
- For Windows, kickoff Android Studio, then click File —> Settings bill of fare item.
- For macOS, start Android Studio, then click Android Studio —> Preferences menu item.
- Select Appearance & Behavior —> Arrangement Settings —> Android SDK menu particular in the popup window left side.
- On the window right side, click the Edit link later the Android SDK Location text box, information technology volition open the SDK Setup dialog.
- At the bottom of the SDK Setup dialog, there is an Android SDK Location text box, you can browse the new Android SDK binder to use information technology.
How To Set Environment Variable For Android Studio,
Source: https://www.dev2qa.com/how-to-set-android-sdk-path-in-windows-and-mac/
Posted by: quesinberryallake.blogspot.com
0 Response to "How To Set Environment Variable For Android Studio"
Post a Comment