Android Studio SDK 托管已禁用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20375881/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 02:46:16  来源:igfitidea点击:

Android Studio SDK Managed Disabled

androidandroid-studioandroid-sdk-tools

提问by Vincent Bernier

I just downloaded the Android Studio .dmg for OSX. Per the installation instructions, I've dragged it to the application folder and launched the application.

我刚刚为 OSX 下载了 Android Studio .dmg。根据安装说明,我已将其拖到应用程序文件夹并启动应用程序。

But the SDK Manager and AVD Manager are greyed out and are impossible to use.

但是SDK Manager和AVD Manager是灰色的,无法使用。

Any ideas on an installation step I may have missed?

关于我可能错过的安装步骤的任何想法?

采纳答案by Vincent Bernier

A project needs to have been loaded at least once for the link to become available.

项目需要至少加载一次才能使链接可用。

Found it in : File / Project Structure... Then in "Android SDK" provide the path to the SDK folder inside the Android Studio Application Bundle.
Then Make a new project.
Then after the initial setup the elements where finally enabled.

在以下位置找到它:文件/项目结构...然后在“Android SDK”中提供 Android Studio 应用程序包内 SDK 文件夹的路径。
然后新建一个项目。
然后在初始设置后最终启用的元素。

回答by MondKin

For people coming for this same problem for Windows: you won't have an Android SDK anywhere if it is your first time with Android. Also, here the Android Studio doesn't come with a packed SDK Manager, so you need to download one.

对于在Windows 上遇到同样问题的人:如果您是第一次使用 Android,您将不会在任何地方使用 Android SDK。另外,这里的 Android Studio 没有打包的 SDK Manager,所以你需要下载一个。

So this is what you may do:

所以这就是你可以做的:

Download the SDK Manager and an Android SDK

下载 SDK Manager 和 Android SDK

  1. Download the SDK Manager from: http://developer.android.com/sdk/. Use the link that says "Get the SDK for an existing IDE".
  2. Execute the downloaded installer.
  3. Execute this program with administrator rights: SDK Manager.exe
  4. Download the proposed SDK (if you get errors regarding the SDK Manager couldn't create some folders, remember it should be executed as administrator).
  1. http://developer.android.com/sdk/下载 SDK 管理器。使用“获取现有 IDE 的 SDK”链接。
  2. 执行下载的安装程序。
  3. 以管理员权限执行此程序:SDK Manager.exe
  4. 下载建议的 SDK(如果您收到有关 SDK Manager 无法创建某些文件夹的错误,请记住它应该以管理员身份执行)。

Configure Android Studio to work with the new SDK

配置 Android Studio 以使用新的 SDK

  1. Open Android Studio and in the Quick Start window click "Configure", you will see the SDK Manager greyed out.
  2. Go to "Project Defaults", then to "Project Structure" and there it will ask for the path where you installed the SDK.
  3. If you click OK and go back you will see the SDK Manager is no longer greyed out, and now you can start creating projects.
  1. 打开 Android Studio 并在 Quick Start 窗口中单击“Configure”,您将看到 SDK Manager 变灰。
  2. 转到“项目默认值”,然后转到“项目结构”,它会询问您安装 SDK 的路径。
  3. 如果单击 OK 并返回,您将看到 SDK Manager 不再显示为灰色,现在您可以开始创建项目了。

回答by RobM

Android Studio Beta v0.8.14 with the Android SDK for Mac does notappear to include the SDK: you need to install the SDK manually (e.g. https://developer.android.com/sdk/installing/index.html?pkg=tools) and then configure Android Studio to find and use it.

带有适用于 Mac 的 Android SDK 的 Android Studio Beta v0.8.14 似乎包含 SDK:您需要手动安装 SDK(例如https://developer.android.com/sdk/installing/index.html?pkg=tools) 然后配置 Android Studio 来查找和使用它。

(I ended up using the ADT bundle, since I couldn't seem to find the SDK as a standalone download.)

(我最终使用了 ADT 包,因为我似乎无法找到作为独立下载的 SDK。)

You need to use the buttons on the welcome dialog, and not on the applications menu bar or preferences (as I had initially thought). Step by step:

您需要使用欢迎对话框上的按钮,而不是应用程序菜单栏或首选项上的按钮(正如我最初的想法)。一步步:

Welcome to Android Studio

欢迎来到安卓工作室

Configure panel

配置面板

(Note that "SDK Manager" is greyed out until you complete this, at which point you cannot undo it for the purposes of taking screenshots...)

(请注意,“SDK 管理器”在您完成此操作之前是灰色的,此时您无法出于截屏的目的撤消它...)

Project Defaults panel

项目默认面板

Project Structure dialog

项目结构对话框

Navigate back and the "SDK Manager" button on the "Configure" panel should be enabled. Clicking it should display something like this:

返回并启用“配置”面板上的“SDK 管理器”按钮。单击它应该显示如下内容:

Android SDK Manager

Android SDK 管理器

回答by rastik

I had a similar problem and the cause was that I've used path with a space in it. There was a warning in the window that can cause problems with NDK, but in fact it caused problems with Android Studio internal SDK as well. After changing the path it works fine.

我遇到了类似的问题,原因是我使用了带有空格的路径。窗口中有一个警告可能会导致 NDK 出现问题,但实际上它也会导致 Android Studio 内部 SDK 出现问题。更改路径后,它工作正常。

回答by NoviceCoder

Go to configure -> project defaults -> project structure

转到配置 -> 项目默认值 -> 项目结构

give the path for the SDK and press OK.

给出 SDK 的路径,然后按 OK。

It should work now

现在应该可以使用了

回答by Subin Sebastian

For Mac Users(Android Studio Beta v0.8.14)

Mac 用户(Android Studio Beta v0.8.14)

The SDK or SDK manager is not included with this version of Android Studio, and the documentation is obfuscated regarding this change at this point.

SDK 或 SDK 管理器不包含在此版本的 Android Studio 中,并且此时文档中有关此更改的内容已被混淆。

  1. Download the standalone SDK from here. You may select the latest revision of the same from this linkbelow the title GET THE SDK FOR AN EXISTING IDE.
  2. Extract the downloaded zip, and rename the folder as sdk
  3. Copy the sdkfolder into the Android Studio.app/Contentsdirectory
  4. Restart Android Studio and you will be shown this dialog when the Android Studio starts up
  1. 这里下载独立 SDK 。您可以从标题GET THE SDK FOR AN EXISTING IDE下方的此链接中选择相同版本的最新版本。
  2. 解压缩下载的 zip,并将文件夹重命名为 sdk
  3. sdk文件夹复制到Android Studio.app/Contents目录中
  4. 重新启动 Android Studio,当 Android Studio 启动时,您将看到此对话框

enter image description here

在此处输入图片说明

回答by Shai Coleman

This will no longer be a problem when version 1.0 is released. In the meanwhile you can download the latest canary build(1.0 RC2), which downloads the SDK during the setup.

当 1.0 版本发布时,这将不再是问题。同时,您可以下载最新的 Canary 版本(1.0 RC2),它会在安装过程中下载 SDK。

回答by MD05

To remove grey out area,

要去除灰色区域,

you need to follow this steps as below:

您需要按照以下步骤操作:

  1. Go to File
  2. Click on Project Structure
  3. Go to SDK Location
  4. Click on Browse to find SDK path
  5. Select proper SDK path on your system
  6. Now click on SDK manager icon on Android Studio toolbar
  1. 转到文件
  2. 点击项目结构
  3. 转到 SDK 位置
  4. 点击浏览找到SDK路径
  5. 在您的系统上选择正确的 SDK 路径
  6. 现在点击 Android Studio 工具栏上的 SDK 管理器图标

I hope this solves the problem of grey out area.

我希望这可以解决灰色区域的问题。

Thanks,

谢谢,

回答by abelabbesnabi

For me, the issue was on windows and it was as simple as launching the installer with "administrative" mode. That's it!

对我来说,问题出在 Windows 上,就像使用“管理”模式启动安装程序一样简单。就是这样!