Android SDK Tools option is missing from SDK Manager in Android Studio 3.6.1

≡放荡痞女 提交于 2020-03-26 00:53:50

问题


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

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.

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

Which gives the following error:

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.

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

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.)


回答1:


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

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

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




回答2:


Step1. Download latest sdk tools from https://androidsdkmanager.azurewebsites.net/SDKTools. up to 2020-03-08 the latest version is 26.2.0.

Step2. Unzip and then copy "tools" folder into android-sdk folder. "tools" and "build-tools" is in the same depth.

Step3. flutter doctor --android-licenses

Step4. flutter doctor



来源:https://stackoverflow.com/questions/60467477/android-sdk-tools-option-is-missing-from-sdk-manager-in-android-studio-3-6-1

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