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 05:59

While first installation There are two situations either you have pre-installed Android SDK if you had used it in past or you have nothing at all, At a time of installation Installer always ask user how you want to configure SDK with your studio.

You can simply give a path here or browse folder where sdk is available in local system. If you already have SDK, Another option as shown in below picture at Left down corner there is a nice option for download SDK, by clicking it you can download SDK with latest release right from there,You can also use third option see in right down corner setup Android SDK for me by clicking it you can step by step set your sdk.

enter image description here

Although you can also set it up when Android shows you list of available projects, a starting prompt window shown below

enter image description here

That's pretty easy, and also sometime if you want to change your SDK you can always change it right in your Android Studio from

On windows system File --> Project Structure and then you will see SDK Location Option and from there you can set it up by providing a path or by browse it.

enter image description here

Or if you are on MAC system then from Platform settings.

enter image description here

查看更多
妖精总统
3楼-- · 2018-12-31 06:00

in windows press ctrl+shift+alt+s which will open project properties where you can find first option named SDK Location click on it and there you can change SDK path, JDK path and NDK path also

查看更多
流年柔荑漫光年
4楼-- · 2018-12-31 06:00

This may not be what you want, but being an eclipse user I had the same problem having duplicate sdk folders which were eating all my ssd space. Currently you can only change sdk path inside android studio project wide which is annoying. What I did instead was I copied all the previous android sdk files that I was using with eclipse to /Android Studio/sdk/ and then just changed the sdk path inside eclipse.

Now both android studio and eclipse are happy.

查看更多
后来的你喜欢了谁
5楼-- · 2018-12-31 06:00

Android Studio is picky about the location of the SDK, if you notice when you first click on the browse button it defaults to your home directory, keep sdk close by and use it, then your project should find the sdk no problem.

查看更多
无与为乐者.
6楼-- · 2018-12-31 06:02

goto menu File->Project Strucurt or key Ctrl + Alt + Shift + S

enter image description here

and example http://how-to-android-studio.blogspot.com/2014/11/set-sdk-location.html

查看更多
伤终究还是伤i
7楼-- · 2018-12-31 06:03
  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.

查看更多
登录 后发表回答