2
D:\>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.18363.1256], locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    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.
[!] Android Studio (not installed)
[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.   

 D:\>flutter doctor --android-licenses
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
            at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
            at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
            at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
            at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
            at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
    Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
            at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
            at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
            at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
            ... 5 more

running on latest stable version Java 8(Update 271) and JDK 15.0.1.

running on Windows 10 Home.

Also flutter version is :

Flutter 1.22.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 7891006299 (13 days ago) • 2020-12-10 11:54:40 -0800 Engine • revision ae90085a84 Tools • Dart 2.10.4

Rudr Thakur
  • 330
  • 3
  • 12
  • It was working fine on jdk 14 yesterday but i was facing issues building the apk. refer here - https://stackoverflow.com/questions/65411479/flutter-build-apk-fails-could-not-determine-the-dependencies-of-task-apppro So i thght i would reinstall everything and maybe it would work and now its throwing this error ! It was working fine earlier – Rudr Thakur Dec 23 '20 at 10:20
  • Check whether android command line tools are installed or not. You can follow this github wiki and solve the issue: https://github.com/flutter/flutter/issues/57017 – Midhun MP Dec 23 '20 at 10:29
  • 1
    Okay so here's how I solved it . 1) Install Android Studio 2) Go to SDK Manager > SDK Platforms > download SDK for Android 11(R) and Android 10(Q) 3) go to SDK tools tab and download Android SDK Command line tools . And the errors were gone ! I guess the command line tools were missing which i forgot to reinstall that caused this issue . Thanks alot – Rudr Thakur Dec 23 '20 at 10:43
  • Happy to know that it worked. Happy Coding!!! – Midhun MP Dec 23 '20 at 10:46

1 Answers1

-1

OK!

  1. I see no IDE (Android Studio / VS Code)
  2. you need to download one of the Android SDK to continue
  3. No Connected devices (which also means, you didn't enable the web also)
  4. After resolving these you should go for android licenses.