Monday, May 25, 2020

How to set android sdk path in Mac for Appium

How to set android sdk path in Mac for Appium



To set the android sdk path in mac system, follow the below steps:


   1.  Install your android studio

    2.  Note down the path of the sdk installed


     Mostly it will be installed in the below path:


How to set android sdk path in Mac for Appium

 

/Users/<username>/Library/Android/sdk/platform-tools

 


Note: in case if you are not able find the Library folder, follow the steps given in the bottom of this post 

 

 

To make it permanent on your system and the variable keep working after close the terminal, and after a restart also follow below steps:


open the the terminal and enter below command:


 nano ~/.bash_profile


Add lines:


export  ANDROID_HOME=/Users/<username>/Library/Android/sdk

export PATH=$ANDROID_HOME/platform-tools:$PATH

export PATH=$ANDROID_HOME/tools:$PATH

press CTRL + X and for saving confirmation click Y.

 

Reopen terminal and check if it worked: enter the command

 

echo $ANDROID_HOME

 

you should see the path of your sdk as below:

/Users/<username>/Library/Android/sdk

 

 

How to view a Mac's ~/Library folder

 

  •     Open the Finder
  •     Go to your Macintosh HD folder
  •     Click on users folder
  •     Open your username folder.
  •     Hold down Cmd + Shift + . (dot)
  •     All the hidden files will become visible.

      Now you will be able to see the Library folder

   

 

 

 

 

 

No comments:

Post a Comment

If any suggestions or issue, please provide