flutter doctor 报错:
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
运行`flutter doctor --android-licenses`后再报错:
����: �������� com.android.sdklib.tool.sdkmanager.SdkManagerCli ʱ���� LinkageError
java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been cntime only recognizes class file versions up to 55.0
解决办法:
打开Android Studio中SDK Manager...
选择8.0版本Command-line Tool安装
如果没有出现8.0版本安装选项,勾选右下角Show Package Details,显示安装包细节
安装完成后,打开以下目录
C:\Users\{当前用户}\AppData\Local\Android\Sdk\cmdline-tools
将8.0文件夹改名为latest文件夹
完成后重新运行flutter doctor即可解决