Skip to content

Instantly share code, notes, and snippets.

@jhesgodi
Forked from ericaroy/Android Home
Last active June 5, 2018 23:24
Show Gist options
  • Save jhesgodi/7997ea1a437883c1ee60114333f96c29 to your computer and use it in GitHub Desktop.
Save jhesgodi/7997ea1a437883c1ee60114333f96c29 to your computer and use it in GitHub Desktop.
Setting Android Home on Mac

Note for me to remember how to set Android Home on Mac

Open Terminal and type in..

nano ~/.bash_profile

Add the below paths The path should be where your android installation is located

export ANDROID_HOME=/Users/username/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Save file and type in terminal... source ~/.bash_profile

Check to see if it is set: echo $ANDROID_HOME Also, you could run into problems with JAVA_HOME not being set.. Find the location of java home and add to bash profile as above

To setup java home: Save any of this on ~/.bashrc

export JAVA_HOME="$(/usr/libexec/java_home -v 1.6)"

or

export JAVA_HOME="$(/usr/libexec/java_home -v 1.7)"

or

export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"

And dont forget to accept agreements:

cd ~/Library/Android/sdk/tools/bin

Run the sdkmanager as follows:

./sdkmanager --licenses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment