-->

Android Studio 2.3 sdk manager tabs grayed out

2020-06-16 09:34发布

问题:

Android Studio 2.3 --> Configure -> SDK Manager. These tabs are grayed out: SDK Tools, SDK Update Sites. Also, checkbox "Show Package Details" is grayed. The system updates normally. There are no error messages.

I think this happened at some point with Studio 2.2. But the standalone SDK manager, which has been deprecated with 2.3, always worked. With 2.3, I can update what is there, but I cannot install/delete packages.

I reviewed some of the previous reports of similar errors. I have tried:

  1. Creating a project, so as to let Gradle find the SDK, etc.
  2. Wipe the installation, incluading the SDK, and reinstall from scratch.
  3. Run as administrator.
  4. Revert to earlier Javas: 8/101, and 8/92.

Nothing makes any difference. The hardware is Intel Xeon 6 or 8 core /Windows 8.1, and Lenovo W520 quadcore running Windows 7. Behavior is identical with all the systems. Java is version 8/121.

Edit: It appears that there are two installations of the sdk, 1. in c:/Users/username/AppData/Local/Android/Sdk, size 1.42GB. 2. another in C:/Android/sdk, size 4.47GB

The sdk in "Local" is newer and smaller. The one in C: is older and larger.

While setting the location to c:/Users/username/AppData/Local/Android/Sdk allows the sdk manager to run, it leaves unexplained why the sdk manager wants to see the older installation.

回答1:

I think I have the answer. The Android Studio Bundle installer installs the sdk to C:/Android/sdk. But the first-run install wizard installs the sdk to c:/Users/username/AppData/Local/Android/Sdk.

On a clean install, the fix is to correct the first-run-wizard sdk path to C:/Android/sdk. The wizard provides a dialog box to do this. Do it before you click "continue", and everything is fine.

But this is a pretty massive error. Apparently, the developers rely on sophisticated tools, without bothering with a final end-to-end check.



回答2:

All you have to do is to click Edit and change Android SDK Location to: C:\Android\sdk or the hard disk you did the installation.



回答3:

A possible workaround for now is to use the command-line tool in the tools/bin/sdkmanager. More info here: https://developer.android.com/studio/command-line/sdkmanager.html



回答4:

Quickest fix to this is to create the folder C:/Android/sdk manually. Then go back into SDK Manager settings and point it at that location. It will then allow you to download the SDK.