Android Studio - How to Change Android SDK Path

前端 未结 29 1817
甜味超标
甜味超标 2020-11-22 03:18

When I open Android SDK Manager from Android Studio, the SDK Path displayed is:

\\android-studio\\sdk

I want to change th

相关标签:
29条回答
  • 2020-11-22 03:53
    1. Click on File menu.
    2. Select Project Structure.
    3. Edit the path in SDK Location text box. From the next time Android Studio will use this location for all your projects.

    N.B.: Avoid having spaces in the path as it may sometimes lead to issues.

    0 讨论(0)
  • 2020-11-22 03:54

    for projects default:

    1. Close current Project (File->Close project)

    You'll get a Welcome to Android Studio Dialog. In that:

    2. Click on Configure -> Project Defaults -> Project Structure

    3. Click on SDK Location in the left column

    4. Put the path to the Android SDK in "Android SDK location" field.

    (Example SDK location: C:\android-sdk; I have sub-folders like add-ons, platforms etc under C:\android-sdk)

    5. Click OK to save changes


    6. Have fun!


    Following steps were for older versions(<1.0) of Android Studio

    4. In the middle column Click on Android SDK (with Android icon) OR click + on the top if you don't see an entry with Android icon.

    5. Change SDK Home Path and select valid Target

    0 讨论(0)
  • 2020-11-22 03:58

    Above answers are pretty correct, but some times Android Studio, does not like to refresh after SDK path change, a quick solution is to make some change in you Build file, and click on Sync. It will refresh you project.

    Happy coding... :)

    0 讨论(0)
  • 2020-11-22 03:58

    In Android Studio 2.2.3 I think you can change default SDK location for all projects from the top menu:

    File -> Project Structure...

    A window like below shows up:

    0 讨论(0)
  • 2020-11-22 03:59

    I'm guessing from the responses that people aren't understanding your question... If I'm right in that you want to have ~\Desktop\github\ then changing the SDK location isn't what you're after.

    From Android Studio 3.2.1: From the new project dialog, choose Configure -> Preferences -> Tools -> Terminal -> Start Directory

    Put the folder you want as your project default in the field.

    e.g. Mine is set to ~/Desktop/github/ since all my work is in ~/Desktop/github/

    0 讨论(0)
提交回复
热议问题