Android Studio 3.0 - SDK path not specified

*爱你&永不变心* 提交于 2019-12-24 00:58:16

问题


I tried to update Android Studio to 3.0 but got some crazy error, so I uninstalled AS and installed AS 3.0, but now when I try to open a file, I get an "SDK path not specified" error and nothing I select is accepted.

I cannot find any file called "android-sdk" or something similar, which is what most of the other solutions on Stack Overflow suggest selecting.

How do I fix this?

Right now I'm trying this, but no clue if it will help:

1. I went to File -> Settings -> System Settings -> Android SDK

2. I specified C:\ProgramFiles\Android and it's installing.

UPDATE: This more or less worked. I had to install a million updates afterwards, but it solved the problem.


回答1:


This is halfway there. I found going through the File -> Settings tree that even though I hadn't selected NDK (Native) options, the folder names must not contain spaces. I created an Android/SDK folder tree on a spare drive all its own to alleviate this concern by AS.

Then without a space in the name, I was able to choose SDKs to download, and so it has begun.

Your question and self-confirmation of a work around got me there after I, myself was looking for a couple weeks. Thanks




回答2:


This is the MOP (Method of Procedure) for this:

Took me a while to figure this out as the documentation is not clear on this at all. Cancel the dialogue box asking for the Android SDK path and do the following:

Open Android Studio IDE. Find the down arrow icon, should be second last icon in the toolbar. Click that. You will see a path for Android SDK Location:. Click the edit link to the right of that. This will bring up the SDK Components Screen. If you can check the boxes there, check them. They may already be checked or they may be disabled. You can leave the path as is, for me its:

 C:\Users\<user name>\AppData\Local\Android\Sdk

Depending on whether you had Android Studio before it may say it has detected a previous version and it will only download the components it needs. This is normal. Now click the NEXT button. A confirmation screen will come up with Setup Type and SDK Folder. If you want to change your SDK Folder this is your last chance, if not, click NEXT again.

It may bring up a Terms & Conditions screen, click the Accept radio button then NEXT. It will go and download the Android base SDK. When it's completed click FINISH.

You will then be taken to the Platforms screen where you can select which Android platforms you want to support. ie, Android 9.0 (Pie), Android 8.1 (Oreo). Select all the platforms you need then click APPLY.

The downloader will grab all those packages for you. Next, click the SDK Tools tab. Check the boxes of the tools you want and click APPLY. It may bring up a Terms & Conditions screen again, click the Accept radio button then NEXT. When completed just click FINISH and you're good to go.



来源:https://stackoverflow.com/questions/47127165/android-studio-3-0-sdk-path-not-specified

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!