macosxandroid

In this tutorial, we will show you how to set ANDROID_HOME Environmental Variable on Mac OS X.

Setting ANDROID_HOME environmental variable on mavericks 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 homedirectory, add a file called .bash_profile

Set the ANDROID_HOME variable to your SDK directory example,

export ANDROID_HOME=/Users/panayiotisgeorgiou/apps/adt-bundle-mac-x86_64/sdk

Setting ANDROID_HOME environmental variable on mavericks 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/panayiotisgeorgiou/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 Open and edit .bash_profile file

$ open -e .bash_profile

Step-2 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-3 Refresh the file using below command

$ source .bash_profile

Step-4 Check if the JAVA_HOME is set properly

$ echo $PATH

You will see the result similar to below.

Find your path in there if it is available and then you are good.

/Users/panayiotisgeorgiou/.rvm/gems/ruby-2.1.2/bin:/Users/Neel/.rvm/gems/ruby-2.1.2@global/bin:/Users/panayiotisgeorgiou/.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