Android sdk mac os path

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.

  1. Open android studio, click File —> Settings menu item in the top men bar.
  2. 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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 .
  5. 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.
Читайте также:  Windows для acer be touched

2. Configure Android SDK Variable In macOS.

  1. Open Android Studio on macOS, then click Android Studio —> Preferences menu item at the left top toolbar.
  2. Input search keyword sdk in the search box of the popup Preferences dialog window left side.
  3. 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.
  4. Generally, the Android SDK is installed in the /Users/user-name/Library/Android/sdk folder on macOS.
  5. 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 ).
  6. 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.

  • This is also another method to show the hidden Library folder, open a macOS Finder window, click Go —> Home menu item. Right-click the home folder, then click the Show View Options menu item in the popup menu list. Check the Show Library Folder checkbox.
  • Use nano to create or edit user bash profile in user home directory.
  • Add ANDROID_HOME and PATH environment variable in user bash profile.
  • Make the added system environment take effect.
  • Now open a terminal and run adb, you should also see something output like in windows.
  • Источник

    agrcrobles / android_instructions_29.md

    A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

    Considering the SDK is installed under /Users/ /Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

    Open JDK 14 works fine with gradle 6.x

    Preferred: To install the JDKs 8 ( LTS ) AdoptOpenJDK:

    Alternative: Do not follow this step if followed the step before

    Be sure JAVA_HOME is exported on your bash profile or zshrc depending the shell in usage.

    Without Android Studio

    Or try Command line tools | Android

    Use Command line tools or SDK Manager

    Quick reminder: Have as many build tools as you want, have a single one platform tool with backwards compatibility :=)

    Download and Install Command line tools for mac ( not the android studio unless I need it )

    Use Homebrew to install Android dev tools: Note that Java8 is tricky since licence changed: https://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac

    Install all of the Android SDK components (you will be prompted to agree to license info and then this will take a while to run):

    If you need to have openjdk first in your PATH run: echo ‘export PATH=»/usr/local/opt/openjdk/bin:$PATH»‘ >>

    For compilers to find openjdk you may need to set: export CPPFLAGS=»-I/usr/local/opt/openjdk/include»

    Be sure Intel Hardware Accelerated Execution Manager (HAXM) is properly installed.

    HAXM is a cross-platform hardware-assisted virtualization engine (hypervisor), be sure HAXM is properly installed.

    SDK preferred location

    sdk can be installed on /Library/Android/sdk or /usr/local/ to be sure check it by

    All locations are valid ones from what I am aware of 🙂

    Suggested: You will have to add the ANDROID_HOME to the profile configuration settings either on .zshrc, .bashrc or .bash_profile

    If emulator doesn’t run, i am here to remind you to provide access into System Preferences — Security & Privacy

    Источник

    Читайте также:  C windows system32 dxgi dll либо не предназначен для выполнения
    Оцените статью