Add SDK tools to path in Android Studio app

后端 未结 5 1428
时光说笑
时光说笑 2020-12-25 14:52

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.a         


        
5条回答
  •  被撕碎了的回忆
    2020-12-25 15:16

    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

提交回复
热议问题