'Showing error in the "flutter doctor" about Android toolchain
Showing error about android toolchain
!] 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.
So I read about this on how to fix this
So I found a command named "flutter doctor --android-licenses" and output of "flutter doctor --android-licenses" is
Android sdkmanager tool not found
(/Users/sagarkhurana/Library/Android/sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.
and I already have android studio and and it's SDK location is "/Users/sagarkhurana/Library/Android/sdk"
Please help me I searched it alot but got no result Thanks
Solution 1:[1]
I had the same problem and I solved it by following the solution at this link; I use Linux but I believe it will fix your problem regarding the operating system you are using.
Solution 2:[2]
Open Android studio > go to SDK manager from more actions > in android SDK option select SDK tools > install android SDK command-line tools(latest) and accept the licence.
It will run and if it still shows some licence is missing type the command given in the cmd and run flutter doctor again after accepting the licence.
Solution 3:[3]
If you do not have the JDK software installed or if JAVA_HOME is not set, then Flutter will give this error message. The following tasks provide the information you need to install the JDK software and set JAVA_HOME on UNIX or Windows systems.
Download software from the below-given link. Download here
After a successful installation, you can now check from the command line using the below command.
- C:\Users\Ainswers>java -version
- java version "1.8.0_251"
- Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
- Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
Kindly exit flutter console (if it is open) then open it again for fresh restart then try to run flutter doctor again. Hope you will get a green check right now.
Solution 4:[4]
just download java for it and it will work well. it happened to me too just try it, download and install java on your system
Solution 5:[5]
Go to SDK Tools in Android studio SDK manager, and check on Android SDK Command-line Tools (Latest) then install it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alex Facciorusso |
| Solution 2 | Saransh |
| Solution 3 | Etienne Kaiser |
| Solution 4 | alex_programmer |
| Solution 5 | CuriousSuperhero |
