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) code example

Example: flutter doctor --android-licenses Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema

Installing Android SDK Command-line tools from Android SDK Manager did the job for me.

1. Open Tools > SDK Manager
2. From the left choose, Appearance & Behavior > System Settings > Android SDK
3. Select SDK Tools from the top menu
4. Check Android SDK Command-line tools and click 'apply'.

Tags:

Java Example