Java 14扑医生

时间:2020-03-20 00:06:27

标签: flutter

Android sdkmanager存在问题,该问题无法在使用HP AMD Pro A10 cpu的Java 14 i上运行

    C:\Users\ELDoctor>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.720], locale en-US)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    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.6)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

C:\Users\ELDoctor

flutter doctor --android-licenses

C:\Users\ELDoctor>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\DEV\SDK\tools\bin\sdkmanager --update



C:\Users\ELDoctor>

更新SDK路径

C:\Users\ELDoctor>flutter config --android-sdk C:\DEV\SDK
Setting "android-sdk" value to "C:\DEV\SDK".

You may need to restart any open editors for them to read new settings.

C:\ DEV \ SDK \ tools \ bin \ sdkmanager --update

C:\Users\ELDoctor>flutter config --android-sdk C:\DEV\SDK
Setting "android-sdk" value to "C:\DEV\SDK".

You may need to restart any open editors for them to read new settings.

C:\Users\ELDoctor>C:\DEV\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:522)
        ... 5 more

C:\Users\ELDoctor>

1 个答案:

答案 0 :(得分:0)

您需要安装 Android SDK Command-lite Tools

打开 Android Studio > 文件 > 外观和行为 > 系统设置 > Android SDK > SDK 工具,然后选择 Android SDK Command-lite 工具并应用更改。Android Studio Settings