关于 Flutter 缓存报错问题 Execution failed for task ':app:checkDebugAarMetadata'. Multiple build operations failed. java.nio.file.NoSuchFileException:

in Flutter with 0 comment

原因

他的报错类似这种,这个是由于 Gradle 导致的

我是因为删除了 rm -rf ~/.gradle/cached

Task :app:checkDebugAarMetadata FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

AILURE: Build failed with an exception.

Execution failed for task ':app:checkDebugAarMetadata'.

Multiple build operations failed.
  java.nio.file.NoSuchFileException: /Users/private/.gradle/caches/transforms-3/*/results.bin
  java.nio.file.NoSuchFileException: /Users/private/.gradle/caches/transforms-3/*/results.bin
  java.nio.file.NoSuchFileException: /Users/private/.gradle/caches/transforms-3/*/results.bin
  java.nio.file.NoSuchFileException: /Users/private/.gradle/caches/transforms-3/*/results.bin
  java.nio.file.NoSuchFileException: /Users/private/.gradle/caches/transforms-3/*/results.bin

如何解决

1、应该删除的是 ~/.gradle ,而不是 ~/.gradle/cached

可能会导致的问题

请开启全局代理,并开启命令行代理 否则重新编译下载 gradle 过程中会导致失败

Responses