1

When I'm running flutter doctor, I was found 1 issue: X Android license status unknown.

C:\src\flutter\bin\flutter.bat doctor --verbose [√] Flutter (Channel stable, 2.0.1, on Microsoft Windows [Version 10.0.19041.264], locale en-US) • Flutter version 2.0.1 at C:\src\flutter • Framework revision c5a4b4029c (6 days ago), 2021-03-04 09:47:48 -0800 • Engine revision 40441def69 • Dart version 2.12.0

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Mariam Younes\AppData\Local\Android\Sdk • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = C:/Users/Mariam Younes/AppData/Local/Android/Sdk • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) X Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.54.1) • VS Code at C:\Users\Mariam Younes\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.20.0

[√] Connected device (2 available) • HUAWEI CUN U29 (mobile) • CCMBBCB780348362 • android-arm • Android 5.1 (API 22) • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.82

! Doctor found issues in 1 category.

And when I'm trying to run flutter doctor --android-licenses, this error happens:

C:\Users\Mariam Younes\AndroidStudioProjects\flutter_app>flutter doctor --android-licenses Error: Could not find or load main class we

Can any one show me where is my error ?

Ramesh-X
  • 4,853
  • 6
  • 46
  • 67
Mariam Younes
  • 389
  • 6
  • 29
  • In Android Studio, you should check to ensure that the Android SDK Command-line Tools are installed. Adding this fixed the issue for me in Flutter. https://stackoverflow.com/a/67791870/8094969 – bm888 Jun 01 '21 at 15:36

2 Answers2

1

For me, flutter doctor --android-licenses didn't work for some reason.

The only command that worked & solved the issue was:

(your android_sdk folder exact path)\tools\bin\sdkmanager --licenses

Ramesh-X
  • 4,853
  • 6
  • 46
  • 67
Amir
  • 177
  • 2
  • 9
0

install android sdk command line tools from Android studio-> preferences-> appearance & Behaviours -> System Setting -> Android Sdk -> android sdk tools -> android Sdk Command line tools make it check and apply. After that you can run your command.

Arslan
  • 1
  • 1