To set ANDROID_HOME
, variable, you need to know how you installed android dev setup.
If you don't know you can check if the following paths exist in your machine. Add the following to .bashrc
, .zshrc
, or .profile
depending on what you use
If you installed with homebrew,
export ANDROID_HOME=/usr/local/opt/android-sdk
Check if this path exists:
If you installed android studio following the website,
export ANDROID_HOME=~/Library/Android/sdk
Finally add it to path:
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
If you're too lazy to open an editor do this:
echo "export ANDROID_HOME=~/Library/Android/sdk" >> ~/.bashrc
echo "export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" >> ~/.bashrc