【问题标题】:> BUG! exception in phase 'semantic analysis' in Flutter> 错误! Flutter 中“语义分析”阶段的异常
【发布时间】:2021-05-09 12:30:41
【问题描述】:

我安装了 Android Studio 和 Flutter。 “扑医生”说这一切都好。 但是当我运行我的第一个应用程序时,出现以下错误:

Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\Mike\Desktop\infect_check\android\settings.gradle' (C:\Users\Mike\.gradle\caches\6.7\scripts\1fnwrr8g4rohfp291nvlxj5qe).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s

感谢您的帮助!!!

【问题讨论】:

    标签: flutter gradle


    【解决方案1】:

    下载旧版本的 JDK 并更新您的 JAVA_HOME 变量。我刚刚降级到 JDK 9,它现在可以工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-30
      • 2022-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-23
      • 2021-12-03
      • 2022-10-25
      相关资源
      最近更新 更多