Setting ANDROID_HOME enviromental variable on MacOS-X

转自stackoverflow

Where the Android-SDK is installed depends on how you installed it.

    1. If you downloaded the SDK through their website and then dragged/dropped the Application to your Applications folder, it’s most likely here:
      (as it is in your case). ```
      1
      2
      * 2. If you installed the SDK using Homebrew (brew cask install android-sdk), then it's located here:
      ``` /usr/local/Caskroom/android-sdk/{YOUR_SDK_VERSION_NUMBER}
    1. If the SDK was installed automatically as part of Android Studio then it’s located here:
      ```
      1
      2
      3

      #### Once you know the location, open a terminal window and enter the following (changing out the path to the SDK to be however you installed it):
      ``` export ANDROID_HOME={YOUR_PATH}

Once you have this set, you need to add this to the PATH environment variable:

PATH
1
2
3

#### Lastly apply these changes by re-sourcing .bash_profile:
``` source ~/.bash_profile
-------------本文结束 感谢您的阅读-------------