-
On terminal app execute below commands step by step:
cd
touch .bash_profile
open -a âTextEditâ .bash_profile
This will open the .bash_profile file with exsisting values we set for Java_Home and PATH
-
Append the file with below command
export ANDROID_HOME=<path of sdk in above step>
Example: export ANDROID_HOME=/Users/<UserName>/Documents/ andriod-sdk-macosx
-
Append the $PATH variable as below (red color already exists, blue color need to be appended)
export PATH=$PATH:/Users/***/Documents/android-sdk-macosx/tools:/Users/***/Documents/android-sdk-macosx/platform-tools
Your .bash_profile file should look as shown in screenshot below.
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin://Users/***/Downloads/maven/bin:/Users/***/Documents/android-sdk-macosx/tools:/Users/***/Documents/android-sdk-macosx/platform-tools
-
Save and close the .bash_profile file
-
execute command on terminal :
source .bash_profile
-
execute command on terminal :
echo $ANDROID_HOME
verify that it shows the location
-
execute command on terminal :
echo $PATH
Verify that it shows the location