Flutter.io Android 许可证状态未知 [英] Flutter.io Android License Status Unknown

查看:20
本文介绍了Flutter.io Android 许可证状态未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    >>• Android SDK a ..Androidsdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at C:Program FilesAndroidAndroid Studiojreinjava
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    X Android license status unknown.

我在运行 Flutter doctor 时遇到 Android SDK 错误,但我仍然可以在我的设备上构建/运行它.我只是想知道如何解决这个问题.我相信我已经下载了最新版本的 Android SDK,不确定发生了什么,因为我上周没有遇到这个问题.

I am getting an error with Android SDK when I run Flutter doctor, although I can still build/run it on my device. I was just curious about how to fix this issue. I believe I have the most updated version of the Android SDK downloaded, not sure what happened because I didn't have this issue last week.

##新问题在评论中遵循了几个可能的修复之后,它导致了一个新问题.我安装了较新版本的 android sdk P、8 和 7 以及新的 jdk10.显然还是不够更新.

##New Issues After following several possible fixes in the comments it has led to a new problem. I installed newer versions of android sdk P, 8, and 7 along with a new jdk10. Still not updated enough apparently.

C:Flutterflutter>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:Users	dmilAppDataLocalAndroidsdk	oolsinsdkmanager --update

C:Flutterflutter>C:usersusernameappdatalocalandroidsdk oolsinsdkmanager.bat --update

C:Flutterflutter>C:usersusernameappdatalocalandroidsdk oolsinsdkmanager.bat --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:582)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 5 more

推荐答案

如果您更新了 android SDK,则许可可能已更改.根据您进行更新的方式,您可能会或可能不会被提示接受更改,或者它可能只是无法保存您确实以一种 flutter 可以理解的方式接受它们的事实.

If you updated the android SDK, the licenses may have changed. Depending on how you did the update you may or may not have been prompted to accept the changes, or maybe it just doesn't save the fact that you did accept them in a way flutter can understand.

要解决,请尝试运行

flutter doctor --android-licenses

这应该会提示您接受许可(它可能会先询问您,以防只需输入 y 并按 Enter - 尽管它应该会告诉您).

This should prompt you to accept licenses (it may ask you first, in case just type y and press enter - although it should tell you that).

如果这样做后仍然有问题,可能值得在 Flutter Github 存储库中打开一个新错误,或添加对现有问题的评论,例如 这个,因为它可能是你所看到的.

If you still have problems after doing that, it might be worth either opening a new bug in the Flutter Github repository, or adding a comment on an existing issue like this one as it may be what you're seeing.

这篇关于Flutter.io Android 许可证状态未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆