在Flutter中出现了以下问题:** Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.**
在格式化系统安装的Android Studio - Chipmunk | 2021.2.1 Patch 2之后,Kotlin版本为212-1.6.10-release-923-AS5457.46。
Flutter版本为3.7.3,Dart版本为2.19.2。
已尝试以下方法:
- 使缓存失效
- 清理gradle文件
- 在Android Studio中,您可以转到Build -> Clean Project
- flutter clean,flutter pub get
- 还尝试过从系统中格式化操作系统并重新安装
[✓] Flutter (Channel stable, 3.7.3, on macOS 12.6.6 21G646 darwin-x64, locale
en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.78.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
详细的逐步解决问题的答案