问题
I install flutter but give some error. I know a lot of solution for this error but them are not fix for me. How can ı solve this problem ?
My JAVA_HOME at C:\Program Files\Java\jdk-13.0.2
- command
C:\Users\Flamador>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Users\Flamador\AppData\Local\Android\Sdk\tools\bin\sdkmanager --update
- command
C:\Users\Flamador>C:\Users\Flamador\AppData\Local\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)
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:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
ı try this command but ...
- command
set JAVA_OPTS=-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
Again
- command
C:\Users\Flamador>C:\Users\Flamador\AppData\Local\Android\Sdk\tools\bin\sdkmanager --update
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.se.ee not found
回答1:
Not all modules are available by default in JDK 13. To solve your problem, its a lot easier if you set your JAVA_HOME
to JDK 1.8 and run the update command.
来源:https://stackoverflow.com/questions/60567498/flutter-a-newer-version-of-the-android-sdk-is-required-to-update-run-error