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

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

问题描述

[!] Android工具链-为Android设备开发(Android SDK 27.0.3)

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)

•Android SDK a .. \ Android \ sdk •未配置Android NDK位置(可选;对本机性能分析支持很有用) •平台android-27,构建工具27.0.3 •Java二进制文件位于:C:\ Program Files \ Android \ Android Studio \ jre \ bin \ java •Java版本OpenJDK运行时环境(内部版本1.8.0_152-release-1024-b02) X And​​roid许可证状态未知.

• Android SDK a ..\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 27.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • 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 on my device. I was just curious on 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.显然仍然没有足够的更新.

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:\Flutter\flutter>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Users\tdmil\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

C:\ Flutter \ flutter> C:\ users \ username \ appdata \ local \ android \ sdk \ tools \ bin \ sdkmanager.bat --update

C:\Flutter\flutter>C:\users\username\appdata\local\android\sdk\tools\bin\sdkmanager.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,则许可证可能已更改.根据您执行更新的方式,可能会提示您是否接受更改,或者可能不会保存您确实以一种颤抖的方式接受更改的事实.

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天全站免登陆