Flutter医生说我有发牌问题

时间:2019-10-19 13:01:24

标签: java flutter

我开始遇到很多有关android studio的问题,试图为新的64位要求重新编译程序。开始给我一个奇怪的错误,即未设置JAVA_HOME环境变量。自从上次编译以来一直很奇怪。 Android Studio有一个全新的版本,所以我进行了所有升级,这就是我尝试运行Flutter Doctor时得到的。我怀疑问题是与jdk 13.0.1有一些差异,但是不确定我应该尝试安装哪个版本,或者我找错了地方。

c:\ src \ flutter>颤振医生

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.5, on Microsoft Windows [Version 10.0.17763.805], locale en-CA)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
      instructions.
[√] Android Studio (version 3.5)
[!] Connected device

! Doctor found issues in 2 categories.

c:\ src \ flutter> flutter医生--android-licenses

A newer version of the Android SDK is required. To update, run:
C:\Users\mctrivia\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

c:\ src \ flutter> C:\ Users \ mctrivia \ 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

2 个答案:

答案 0 :(得分:0)

解决了问题。需要使用oracle注册帐户并下载Java 8 SDK

答案 1 :(得分:0)

除了安装JavaJDK外,还需要安装Android SDK Command-line tools

enter image description here