[英]Android license status unknown?
For app development I download and installed Flutter sdk along with its dependencies Android studio, Java.对于应用程序开发,我下载并安装了 Flutter sdk 及其依赖项 Android Studio、Java。 After installing all I came to an error for checking
flutter doctor
.安装完所有内容后,我在检查
flutter doctor
出现错误。 The following error came:出现以下错误:
Android toolchain - develop for Android devices (Android SDK version 28.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.
Then after searching with the help of Flutter Android license status unknown I tried to update Android SDK with PathToAndroidSDK --update
It again generates following error:然后在Flutter Android license status unknown的帮助下搜索后,我尝试使用
PathToAndroidSDK --update
更新 Android SDK 它再次生成以下错误:
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:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
Refer : https://robbinespu.gitlab.io/blog/2020/03/02/flutter-issue-android-license-status-unknown-on-windows/参考: https : //robbinespu.gitlab.io/blog/2020/03/02/flutter-issue-android-license-status-unknown-on-windows/
In Android Studio -> Tools -> SDK Manager -> Android SDK -> SDK Tools 1. Uncheck the "Hide Obsolete Packages" 2. Select Android SDK Tools(Obsolete) and Apply在 Android Studio -> Tools -> SDK Manager -> Android SDK -> SDK Tools 1. 取消勾选“Hide Obsolete Packages” 2. 选择 Android SDK Tools(Obsolete) 并应用
After the installation try "flutter doctor" from command prompt.安装后从命令提示符尝试“flutter doctor”。 If some licenses are not accepted then accept by using "flutter doctor --android-licenses"
如果某些许可证不被接受,请使用“flutter doctor --android-licenses”接受
Finally, I got the solution how to fix Android licenses status unknown最后,我得到了如何修复 Android 许可证状态未知的解决方案
Firstly, if you are watching this error首先,如果您正在观看此错误
Android toolchain - develop for Android devices (Android SDK version 28.0.3) X Android license status unknown. Android 工具链 - 为 Android 设备开发(Android SDK 版本 28.0.3) X Android 许可证状态未知。 Try re-installing or updating your Android SDK Manager.
尝试重新安装或更新您的 Android SDK 管理器。 See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
有关详细说明,请参阅https://developer.android.com/studio/#downloads或访问https://flutter.dev/setup/#android-setup 。
then go and uninstall "Android sdk tool" and "Obsolete" and reinstall.然后去卸载“Android sdk tool”和“Obsolete”并重新安装。 Then, run the code "flutter doctor" You will see some like this "If some licenses are not accepted then accept by using "flutter doctor --android-licenses"
然后,运行代码“flutter doctor”你会看到这样的“如果某些许可证不被接受,则使用“flutter doctor --android-licenses”接受
Then run the code if you got stuck and not be able to reply "y" then goto this link and download Command line tools only and extract it and put sdkmanager file in C:\\Users\\i\\AppData\\Local\\Android\\Sdk\\tools\\bin and run cmd in this folder and type "sdkmanager --licenses" and now you are good to go.如果卡住了并且无法回复“y”,则运行代码然后转到此链接并仅下载命令行工具并将其解压缩并将sdkmanager 文件放在 C:\\Users\\i\\AppData\\Local\\Android\\Sdk\\ tools\\bin 并在此文件夹中运行 cmd 并键入“sdkmanager --licenses” ,现在您可以开始了。
After a long night i figured out that i have installed a bad Java version.经过一个漫长的夜晚,我发现我安装了一个错误的 Java 版本。
I solved this installing JDK 8, correctly and setting the jdk path on android studio.我解决了这个安装 JDK 8,正确并在 android studio 上设置 jdk 路径的问题。
After that在那之后
flutter doctor --android-licenses
Of course the obsolete tools should be installed too当然过时的工具也应该安装
Hope it helps.希望能帮助到你。 To some one reaching here.
给到达这里的人。
Go to Android Studio and update the sdk tools and plugins. 转到Android Studio并更新SDK工具和插件。
Perform the following steps https://developer.android.com/studio/intro/update#sdk-manager 执行以下步骤https://developer.android.com/studio/intro/update#sdk-manager
and run the flutter doctor 然后跑扑扑医生
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.