Set ANDROID_HOME environment variable in MAC OS

Follow steps mentioned below :

1. Open Terminal and type following command :

cd ~/

2. If you have .bash_profile in computer path then open it using following command

$ open -e .bash_profile

otherwise, create a new bash profile using below command and then open it using command mentioned in step 2

touch .bash_profile

3. Now save below commands into the file

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

4. Close Terminal and open new terminal and run following commands to make sure that environment variable is set or not :

source ~/.bash_profile
echo $ANDROID_HOME

You should get the Android sdk path as an output after running the above command which means environment vriable is set. Refer below screen shot :
Android_Home

Leave a Reply

Your email address will not be published. Required fields are marked *