Android Studio 3.6.1中的SDK Manager中缺少"Android SDK工具"选项 [英] Android SDK Tools option is missing from SDK Manager in Android Studio 3.6.1

查看:838
本文介绍了Android Studio 3.6.1中的SDK Manager中缺少"Android SDK工具"选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新安装的macOS Catalina上,我安装了Android Studio 3.6.1.

On a freshly installed macOS Catalina, I installed Android Studio 3.6.1.

在Mac上设置Flutter SDK的过程中运行flutter doctor时,出现以下错误.

I've got the following error when I ran flutter doctor in the course of setting up flutter SDK on my Mac.

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    ✗ Android license status unknown.
        Try re-installing or updating your Android SDK Manager.
        See https://developer.android.com/studio/#downloads or visit
        https://flutter.dev/setup/#android-setup for detailed instructions.

我重新安装了Android Studio,并按照错误消息中第二个链接中的说明进行操作,但是这些链接似乎无助于解决问题.我还尝试了以下方法:

I re-installed Android Studio and follow the instructions in the second link in the error message, but these links do not seem to help resolving the issue. I also tried the following:

$ flutter doctor  --android-licenses

哪个出现以下错误:

Android sdkmanager tool not found
(/Users/username/Library/Android/sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.

我检查了安装情况,发现~/Library/Android/sdk/下缺少tools目录.

I checked my installation and found out that tools directory is missing under ~/Library/Android/sdk/.

此外,我发现Android Studio

Also, I found out Android SDK Tools option is missing from SDK Tools tab in SDK Manager of the Android Studio as shown in this screenshot. (Android SDK Tools option was present on my previous installation of Android Studio 3.5.3.)

有人遇到过类似的问题吗?我不确定自己在做什么错.如果有人可以告诉我如何解决此问题,我将不胜感激! (这是我关于堆栈溢出的第一个问题.请原谅我冗长的帖子.)

Has anyone had the similar problem? I am not sure what I'm doing wrong. If anyone can show me how I can fix this issue, I'd appreciate it! (This is my first question on Stack Overflow. Please excuse me for lengthy post.)

推荐答案

我正在使用Linux,但我想问题可能是相同的.

I'm using Linux but I guess the problem might be the same.

启动Android Studio并转到"SDK管理器"-您可以在创建一个空白项目并在"AVD管理器"选项下进入工具-> SDK管理器"后启动它.在新窗口中,打开系统设置-> Android SDK".从那里选择"SDK工具".现在,您需要取消选中窗口底部的隐藏过时的软件包"选项.现在应该出现一个新选项:"Android SDK Tools(已淘汰)"-检查并单击"Apply"(应用),它将下载文件,并且"Tools"文件夹将出现在Android文件夹中.然后,只需在终端中运行"flutter doctor",然后应要求您接受一些许可证-只需运行:

Launch Android Studio and go to "SDK Manager" - you can launch it after creating a blank project and going "Tools -> SDK Manager" under the "AVD Manager" option. In the new window open "System Settings -> Android SDK". From there pick "SDK Tools". Now you need to uncheck the "Hide Obsolete Packages" option in the bottom of the window. Now there should appear a new option: "Android SDK Tools (Obsolete)" - check that, hit "Apply" - it will download the files and "Tools" folder will appear in the Android folder. Then simply run "flutter doctor" in the terminal and you should be asked to accept some licenses - simply run:

$ flutter doctor --android-licenses

它帮助了我.我不知道为什么无论如何Flutter都需要使用这个选项.检查设置打印屏幕.

It helped me. I don't know why this option went obsolete when Flutter requires it anyway. Check the settings printscreen.

这篇关于Android Studio 3.6.1中的SDK Manager中缺少"Android SDK工具"选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆