Setting ANDROID_HOME Environmental Variable on Mac

nilan avtar
Nilanchala Panigrahy 馃尡

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.


Start up Terminal and go to your home folder.

cd ~/


Open and edit .bash_profile file

$ open -e .bash_profile

If you don鈥檛 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


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


Refresh the file using below command

$ source .bash_profile


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


Alternatively, You can run android command, it will start android SDK manager

Sharing is caring!

Did you like what Nilanchala Panigrahy 馃尡 wrote? Thank them for their work by sharing it on social media.

nilan avtar

Nilanchala Panigrahy 馃尡

I'm a blogger, educator and a full stack developer. Mainly focused on Java, Spring and Micro-service architecture. I love to learn, code, make and break things.

Related articles