我刚刚开始学习Flutter。
在我的 Mac 上安装 Android studio 时出现错误 😭
(实际上,安装已经完成,应用程序看起来不错。但是 flutter doctor 返回问题)
我通过
flutter doctor
命令到达了下面。
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
~/Downloads/cmdline-tools/bin/sdkmanager --install "cmdline-tools;latest"
'Exception in thread "main" 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 52.0'
有人跟我有同样的问题吗?我可以获得一些帮助吗?
不紧急,因为iOS模拟器运行良好,但我想一起检查Android模拟器...
提前致谢。