React Native android home setup for Mac OS

React native needs to setup android home for running emulator (SDK and AVD). run the following command in terminal

export ANDROID_HOME=/Applications/ADT/sdk

Add this to the PATH environment variable

export PATH=$PATH:$ANDROID_HOME/platform-tools

Then Setup in the bash_profile file

source ~/.bash_profile

 

To make it permanent on your system and the variable keep working after close the terminal, ou after a restart use:

nano ~/.bash_profile 

Add lines:

export ANDROID_HOME=/YOUR_PATH_TO/android-sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/emulator

Reopen terminal and check if it worked:

source ~/.bash_profile
echo $ANDROID_HOME