In this tutorial, we will show you how to set ANDROID_HOME Environmental Variable on Mac OS X.
Setting ANDROID_HOME environmental variable on Maverick Mac OS X Lion (10.7.5)
The ANDROID_HOME environment variable can be used to tell maven where to find the Android SDK. In your home directory, add a file called .bash_profile
Set the ANDROID_HOME variable to your SDK directory example,
export ANDROID_HOME=/Users/alebirke/apps/adt-bundle-mac-x86_64/sdk
Setting ANDROID_HOME environmental variable on Maverick Mac OS X (10.9.x)
Configure the ANDROID_HOME environment variable based on the location of the Android SDK. Additionally, consider adding ANDROID_HOME/tools, and ANDROID_HOME/platform-tools to your PATH.
$ export ANDROID_HOME=/Users/Neel/Documents/Softwares/adt-bundle-mac-x86_64-20140321/sdk $ export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Setting ANDROID_HOME environment variable to .bash_profile
Open the Terminal program present in your (this is in your Applications/Utilities folder by default). Follow the below steps.
Step-1
Start up Terminal and go to your home folder.
cd ~/
Step-2
Open and edit .bash_profile file
$ open -e .bash_profile
If you don’t have .bash_profile file in your computer path, then create one. Enter below command to create a new file. Once created follow Step-2.
touch .bash_profile
Step-3
Save the below line)
export PATH=${PATH}:/Applications/adt-bundle-mac-x86_64-20140321/sdk/tools export PATH=${PATH}:/Applications/adt-bundle-mac-x86_64-20140321/sdk/platform-tools
Step-4
Refresh the file using below command
$ source .bash_profile
Step-5
Check if the JAVA_HOME is set properly
$ echo $PATH
You will see the result similar to below. Find for your path in there. If available, then you are good
/Users/Neel/.rvm/gems/ruby-2.1.2/bin:/Users/Neel/.rvm/gems/ruby-2.1.2@global/bin:/Users/Neel/.rvm/rubies/ruby-2.1.2/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/adt-bundle-mac-x86_64-20140321/sdk/tools:/Applications/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:/Users/Neel/.rvm/bin
Alternatively, You can run android
command, it will start android SDK manager