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:07

Try this way i try in Android Studio 2.0
Step 1: File->Setting
Step 2: Seting->SDK option
Step 3: Click Edit option in Sdk Location
Step 4: Show "SDK Components Setup"
Step 5: Click on Three "..." in "SDK Components Wizad"
Step 6: Select your new SDK Path
enter image description here

查看更多
千与千寻千般痛.
3楼-- · 2018-12-31 06:10

I had the same problem, but with the sdk path pointing to a mounted drive. I found, that simply quit Android Studio, unmount the device and restart Android Studio made it ask for the sdk location, because it had none (Android Studio Beta 0.8.7).

Therefore I guess if you just quit Android Studio, delete \android-studio\sdk or move it somewhere else and start Android Studio again, it should ask for the sdk location aswell.

查看更多
不流泪的眼
4楼-- · 2018-12-31 06:11

Though many of the above answers serve the purpose, there is one straight forward thing we can do in project itself.

In Eclipse, go to Window->Preferences, select "Android" from left side menu. On the right panel you will see "SDK Location". Provide the path here.

Good luck.

查看更多
明月照影归
5楼-- · 2018-12-31 06:12

This is how its done,in Android Studio for windows First got to Project Structure

Then to sdk location tab

From there select android sdk location and select your sdk path and then click on OK button

Done

查看更多
浪荡孟婆
6楼-- · 2018-12-31 06:13

From Android Studio 1.0.1

Go to

  1. File -> project Structure into Project Structure
  2. Left -> SDK Location
  3. SDK location select Android SDK location (old version use Press +, add another sdk)
查看更多
旧人旧事旧时光
7楼-- · 2018-12-31 06:16

Thanks DheeB, indeed!
But my solution is to link android's SDK dir to android studio's one:
ln -s <FULL_PATH_TO_ANDROID_SDK> <PATH_TO_ANDROID_STUDIO>/sdk
and of course beforehand, for just in case, you need to move
mv <PATH_TO_ANDROID_STUDIO>/sdk to <PATH_TO_ANDROID_STUDIO>/sdk_orig
And additionally I've had to correct project's build.gradle file and specify
classpath 'com.android.tools.build:gradle:0.6.+'
(instead of 0.5.+)

查看更多
登录 后发表回答