Flutter and java sdk


i’ve reached a brickwall with java.

$ flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
/Users/simonhampton/Library/Android/sdk/tools/bin/sdkmanager --update
$ /Users/simonhampton/Library/Android/sdk/tools/bin/sdkmanager --update

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
    at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)

I have

$ java --version
java 12.0.2 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

I feel like I’ve installed everything possible – jre, jdk, dfk, openadk,….and nothing works. Is there a guaranteed solution to make java work?


Try it with java 8 SDK or versions before it, Not after this version.

Answered By – Mohamed Reda

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *