几个月来,我一直在开发 Flutter 移动应用程序,一切都很好。我刚回到项目,升级了一些东西( flutter 、飞镖、android 工作室等)。现在我无法编译我的应用程序。我创建了一个新的 flutter 应用程序(默认示例),它也不会编译。
我得到的错误是:
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings remapped class cache for bq3hllkgb26p0nrblf5gh8d37 (C:\Users\Paul\.gradle\caches\5.6.2\scripts-remapped\settings_cbd968glg60byp9f5t6vvdlee\bq3hllkgb26p0nrblf5gh8d37\settings8410a2d21ed2f87c8a0398566330ee52).
> Could not open settings generic class cache for settings file 'D:\Apps\Flutter\Examples\flutter_app\android\settings.gradle' (C:\Users\Paul\.gradle\caches\5.6.2\scripts\bq3hllkgb26p0nrblf5gh8d37\settings\settings8410a2d21ed2f87c8a0398566330ee52).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 57
我在运行:flutter 1.20.2
飞镖 2.9.1
安卓工作室 4.1
Java 1.8.0_261
JVM 13.0.2
Gradle 6.7
window 10
最佳答案
尝试运行
flutter stable
flutter clean
flutter downgrade
cd <Your App Folder>
进而flutter run
在命令行中
关于android-studio - Android Studio中的Flutter编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64585003/