Setting ANDROID_HOME enviromental variable on Mac OS X
I’m using React Native with Catalina mac os and zsh shell
1- touch ~/.zshrc
2- open ~/.zshrc
3- according to React Native android setup copy and past
export ANDROID_HOME=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin export PATH=$PATH:$ANDROID_HOME/platform-tools
to the opened text file then save and close the file.
4- run source ~/.zshrc and make sure to restart your terminal.
5- run adb you will get something like
Android Debug Bridge version 1.0.41 Version 30.0.0-6374843
thanks for this documented
update1 16/2/2021
this solution works with Big Sur as well.
Nguồn : https://stackoverflow.com/questions/19986214/setting-android-home-enviromental-variable-on-mac-os-x