-
-
Save ericaroy/d08a846daeebe145d2ef to your computer and use it in GitHub Desktop.
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 |
I come here to set ANDROID_HOME but it does not work after update bash_profile.
I found arround, we may need add the config to ~/.zshrc as we did in ~/.bash_profile.
Hope it helps
export ANDROID_HOME=/Users/{your name}/Library/Android/sdk
export ANDROID_TOOLS=/Users/{your name}/Library/Android/sdk/tools/
export ANDROID_PLATFORM_TOOLS=/Users/{your name}/Library/Android/sdk/platform-tools/
export PATH=$PATH:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS
I come here to set ANDROID_HOME but it does not work after update bash_profile. I found arround, we may need add the config to ~/.zshrc as we did in ~/.bash_profile. Hope it helps
export ANDROID_HOME=/Users/{your name}/Library/Android/sdk export ANDROID_TOOLS=/Users/{your name}/Library/Android/sdk/tools/ export ANDROID_PLATFORM_TOOLS=/Users/{your name}/Library/Android/sdk/platform-tools/ export PATH=$PATH:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS
This works, thanks bro
More information:
I added to .zshrc file by these command line:
touch .zshrc
open .zshrc
This worked great, thank you.