Setup Android SDK Home in Your Mac Permanantly ($ANDROID_HOME)

Setup Android SDK Home in Your Mac Permanantly ($ANDROID_HOME)

Hello,

Welcome to short tutorial about how to setup Android SDK Home in Mac OS X.  Setting up android SDK home will be helpful in many situations. I will list out some situations,

 

  1. When you are working with Jenkins in your local Pc.
  2. When you are working with Appium Test Automation framework.
  3. Background apps trying to access Android SDK, needed ANDROID_HOME.

 

I assume that you have already downloaded and installed the Android SDK.

 

Open Your terminal and edit the bash_profile

You can use nano or VI editor.

vi ~/.bash_profile

 

and paste this following configurations in the file and save.

 

export ANDROID_HOME=/YOUR_PATH_TO/android-sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH

 

After you save, Make sure you to close and re-open the terminal.

 

try this,

echo $ANDROID_HOME

 

It should print your SDK path correctly.

 

MacBook-Pro:~Admin$ echo $ANDROID_HOME

YOUR_PATH_TO/android-sdk

 

How to check the Add ANDROID_HOME Path is correct

 

open terminal and type this command,

 

MacBook-Pro:~ admin$ vi ~/.bash_profile

 

Now, It should show correctly like above.

 

export ANDROID_HOME=/YOUR_PATH_TO/android-sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH

 

 

 

Cheers…!

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.