【问题标题】:"Execution failed for task ':A_CERTAIN_MODULE:bundleLibCompileToJarDebug'" while building project, after gradle update“任务'执行失败:A_CERTAIN_MODULE:bundleLibCompileToJarDebug'”在构建项目时,在gradle更新之后
【发布时间】:2021-10-11 18:17:43
【问题描述】:

今天,android studio 告诉我,我的项目的 Gradle 可以更新到 7.0.2。这就是我的痛苦开始的地方......

Gradle 已成功更新。但是当我尝试调试应用程序时,出现了错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':awesome_notifications:bundleLibCompileToJarDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.BundleLibraryClassesWorkAction
   > Zip file '[PATH_TO_PROJECT]\build\awesome_notifications\intermediates\compile_library_classes_jar\debug\classes.jar' already contains entry 'me/carda/awesome_notifications/AwesomeNotificationsPlugin.class', cannot overwrite

我花了几个小时试图修复它。我尝试了很多事情:重新启动 IDE、flutter clean、无效缓存重新启动、删除 .gradle 文件夹等。 所以我决定删除这个包,正如预期的那样,上面的错误没有显示,而是显示了一些未知的导入错误,这很明显,因为我在我的代码中使用了这个包。接下来,我将包重新添加到依赖项并运行 pub get,当我尝试调试应用程序时,再次显示上述错误。

颤振医生

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1110], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.58.2)
[√] Connected device (3 available)

• No issues found!

我不知道这个错误是否与该特定包或 gradle 有关。请帮忙。

【问题讨论】:

    标签: android flutter android-studio gradle android-gradle-plugin


    【解决方案1】:

    您是否尝试更改 build.gradle 文件中的 gradle 版本。可能是您的包依赖于以前的 gradle 版本,因此请尝试将其恢复为旧版本。

    【讨论】:

      猜你喜欢
      • 2021-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-10
      • 1970-01-01
      • 1970-01-01
      • 2015-08-31
      相关资源
      最近更新 更多