Flutter : can't accept android licenses


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
• 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:
• Dart plugin can be installed from:
• 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 ?


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

Answered By – Amir

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published