Flutter 错误:文件“com.android.builder.files.ZipCentralDirectory@7869c730”已删除,但在缓存中找不到以前的版本

Roc*_*kzy 2 dart flutter

我正在编写我的 flutter 应用程序,不知从哪里弹出了一个错误,我到处搜索来修复它,但我不能。文件中没有错误

这是调试控制台中显示的错误

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > File 'com.android.builder.files.ZipCentralDirectory@7869c730' was deleted, but previous version not found in cache

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > File 'com.android.builder.files.ZipCentralDirectory@4d38c6ab' was deleted, but previous version not found in cache

* 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 1m 13s
Exception: Gradle task assembleDebug failed with exit code 1
Run Code Online (Sandbox Code Playgroud)

请帮帮我......

Mur*_*tio 5

flutter clean 命令解决了这个问题

  • flutter clean 命令无法解决此问题 (2认同)