【问题标题】:I have a prop with building my flutter app我有一个构建我的颤振应用程序的道具
【发布时间】:2020-11-10 11:48:07
【问题描述】:

当我运行我的应用程序时,会显示以下错误消息:

Launching lib\main.dart on AOSP on IA Emulator in debug mode…
lib\main.dart

FAILURE: Build failed with an exception.

What went wrong:
Could not open settings remapped class cache for bq3hllkgb26p0nrblf5gh8d37 (C:\Users\amabd.gradle\caches\5.6.2\scripts-remapped\settings_dok3hc1t57922ptib73pz9y10\bq3hllkgb26p0nrblf5gh8d37\settings8410a2d21ed2f87c8a0398566330ee52).
Could not open settings generic class cache for settings file ‘D:\projects\flutter\photo\photos\android\settings.gradle’ (C:\Users\amabd.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

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 3s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

谁能帮我解决这个问题?

【问题讨论】:

  • 在运行前尝试“flutter clean”
  • 我试过了,还是出现错误。
  • 尝试在我的设备上部署更完整的应用程序时遇到同样的问题

标签: android flutter gradle


【解决方案1】:

转到此文件夹并删除所有缓存文件。

  C:\Users\amabd.gradle\caches

然后尝试重启项目。

【讨论】:

  • 我删除了所有的 chaced 文件,仍然出现错误
【解决方案2】:

我得到了答案.. 您应该删除flutter SDK并重新安装它。然后通过以下方式对其进行最后一次更新:

flutter upgrade

【讨论】:

    【解决方案3】:

    在搜索和删除 android studio 数小时后,我遇到了同样的问题。我将 java 降级为 java-8 并在 OS 中设置了 java_home,它就像一个魅力。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-17
      • 1970-01-01
      • 1970-01-01
      • 2020-08-20
      • 2021-03-26
      • 2021-08-09
      • 2021-06-14
      • 2020-08-19
      相关资源
      最近更新 更多