Android Studio - How to Change Android SDK Path

2018-12-31 05:33发布

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

\android-studio\sdk

I want to change this path. How do I do it?

30条回答
明月照影归
2楼-- · 2018-12-31 06:17

Here's how you can change the android sdk path in Android studio:

  1. Open your required android project in Android studio
  2. Click on the main project folder and press F4
  3. Now click on "SDKs" under Platform Settings (Left hand side of the dialog box)
  4. You should now see a plus sign on the top, click it and choose "Android SDK"
  5. Now you would be asked to choose the required SDK folder
  6. Select the required build target(if necessary) and click "ok"
  7. Now you should see the new entry in the list of SDKs
  8. Click "Modules" under Project Settings
  9. Select your project folder and in the Dropdown for "Module SDK", select the new SDK entry and click "apply"
  10. Now click "OK" and your done.

Note: If changes do not take effect, restarting android studio should fix the problem.

查看更多
姐姐魅力值爆表
3楼-- · 2018-12-31 06:17

Make your life easy with shortcut keys
ctrl+shift+alt+S
or

by going to file->project structure:
enter image description here

it will open this window, where you can select your SDK
enter image description here

查看更多
笑指拈花
4楼-- · 2018-12-31 06:19

EUREKA I found it!

With the current Studio 1.3 each project has a local.properties file where you can edit the SDK!

查看更多
浅入江南
5楼-- · 2018-12-31 06:20
  1. Tap --> file --> close current project.

You'll Android Studio home page

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

  2. Click on SDK Location in the left column and copy the path.

  3. Paste the path in My computer --> Right Click -> Properties -> click on Advanced system settings -> Environment variables and change the android home path.

  4. click on 'OK' to save the session.

  5. Add tools and platforms tools in path and save the changes.

  6. Open command prompt[window+R] and type adb + enter.

查看更多
大哥的爱人
6楼-- · 2018-12-31 06:21

In Android Studio you can set the general Android SDK path in the file: %Home%.AndroidStudio2.1\config\options\jdk.table.xml

查看更多
临风纵饮
7楼-- · 2018-12-31 06:23

Simple Answer Work For Sure...

Step 1: Right Click On The Project>> Select Open Module Setting --> Step 2: Select SDK Location From the Right Side below image

enter image description here

Step 3: Now browse the SDK location from your computer as show below... enter image description here

Step 4: Click on OK.

查看更多
登录 后发表回答