Configure Android SDK Environment Variable on MacOS

 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

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.  

Wed, 12/15/2021 - 12:31

Authored by

Tarun Goswami, works as a Technical Lead at the well-known IT services company. With Over 11+ years of experience in Quality Assurance, he writes engaging and informative blogs in his spare time.