Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 873
Tetsuya Avatar asked Feb 29 '20 16:02

Tetsuya


2 Answers

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.

enter image description here

like image 56
ThatKidMike Avatar answered Sep 27 '22 17:09

ThatKidMike


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

like image 22
dogdog Avatar answered Sep 27 '22 17:09

dogdog