简体   繁体   中英

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

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.

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.

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

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.

Go to SDK Tools in Android studio SDK manager, and check on Android SDK Command-line Tools (Latest) then install it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM