2

i keep getting this error after running flutter doctor --android-licenses i installed all sdk tools also i ran the flutter clean and flutter build and i added the sdk platforms path to env variables
here's my flutter doctor --android-licenses output:

Error: Could not find or load main class USERNAME\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\\..

and here's my flutter doctor -v output :

[√] Flutter (Channel master, 2.3.0-17.0.pre.47, on Microsoft Windows [Version
10.0.19041.985], locale en-CA)
• Flutter version 2.3.0-17.0.pre.47 at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fdb1fb184d (6 days ago), 2021-05-24 22:04:02 -0700
• Engine revision b1385c0df1
• Dart version 2.14.0 (build 2.14.0-145.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc4)
    • Android SDK at C:\Users\USERNAME\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 31.0.0-rc4
    • ANDROID_HOME = C:\Users\houda bouhsiss\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    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\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.2.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 11.0.8+10-b944.6842174)

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 90.0.818.66

! Doctor found issues in 1 category.






 
shrooma
  • 53
  • 1
  • 7

1 Answers1

0

I fixed it with reinstalling/installing the Android SDK Command-line Tools

More Informations:

https://stackoverflow.com/a/67720572/14058016

stonith404
  • 321
  • 2
  • 10