Configure Android SDK Environment Variable on MacOS

Profile picture for user devraj

 To configure Android SDK environment variable on MacOS, use below steps:

Step 1: Open Terminal

Step 2: Open .bash_profile file, using either of below command:

$ open .bash_profile
$ vim .bash_profile

if the file is not already created and you want to use open filename, first you need to create it using below command

$ touch .bash_profile

 Step 3: Paste following lines in .bash_profile, you need to replace tarungoswami with your username

export ANDROID_HOME=/Users/tarungoswami/Library/Android/sdk
export PATH=$ANDROID_HOME/platfor:wqm-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH

Step 4: Save file opened using vim editor by typing :wq

Step 5: Use source command

$ source .bash_profile

Step 6: Type in terminal command adb , command should be found.  

Tags