Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add SDK tools to path in Android Studio app

I have just installed Android Studio 0.2.2. I want to add the SDK tools to the $PATH, which are in this folder:

/Applications/Android\ Studio.app/sdk/tools

so that I can use them with e.g. Phonegap.

But after I add this folder to the $PATH, it still keeps saying:

android: command not found

Oddly, I can't run any of the executables in that folder even when I cd to that folder and type their names.

What am I doing wrong?

like image 900
keune Avatar asked Aug 09 '13 08:08

keune


1 Answers

It seems that newer versions of Android Studio don't come bundled with the SDK. So, /Applications/Android\ Studio.app/sdk/tools will no longer work.

After launching the SDK Manager from Android Studio, I realized the new path is /Users/$USER/Library/Android/sdk/tools.

Steps

  1. Open your ~/.bash_profile file by issuing the command open ~/.bash_profile on the terminal

  2. Add the following lines to the end of that file

    1. export PATH=/Users/$USER/Library/Android/sdk/tools:$PATH
    2. export PATH=/Users/$USER/Library/Android/sdk/tools/bin:$PATH
    3. export PATH=/Users/$USER/Library/Android/sdk/platform-tools:$PATH
  3. Save and close the ~/.bash_profile file

  4. If you want the changes to take action on the current terminal, then source ~/.bash_profile; otherwise, close and re-open the terminal, and the changes will take place automatically

like image 53
Nestor Turizo Avatar answered Oct 25 '22 05:10

Nestor Turizo