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