flutter doctor --android-licenses报错解决方案
C:\Users\32148>flutter doctor --android-licenses
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
����: �������� com.android.sdklib.tool.sdkmanager.SdkManagerCli ʱ���� LinkageError
java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Android sdkmanager tool was found, but failed to run
(C:\Users\32148\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat): "exited code 1".
Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
解决方案:
安装jdk17,若还不行,按以下步骤行动
Windows
- 取消勾选and sdk command line tools (latest)
- 勾选 Android SDK command-line Tools 8.0
- 点击应用
- 在Windows, 将 “C:\Users\USERNAME\AppData\Local\Android\Sdk\cmdline-tools” and 重命名 8.0 folder to “latest”
- 再次运行 Flutter doctor.
成功!
来源地址:https://blog.csdn.net/qq_42901723/article/details/132744960
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341