升级flutter版本,构建的时候,出现Kotlin增量编译缓存错误
侧边栏壁纸
  • 累计撰写 3 篇文章
  • 累计收到 0 条评论

升级flutter版本,构建的时候,出现Kotlin增量编译缓存错误

seeking
2026-06-10 / 0 评论 / 1 阅读 / 正在检测是否收录...

报错信息:
What went wrong: Execution failed for task ':shared_preferences_android:compileDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.btapi.BuildToolsApiCompilationWork > java.lang.Exception: Could not close incremental caches in D:\projects\flutterprojects\peafowlpd\build\shared_preferences_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab

解决方案:
在app/gradle.properties关闭增量编译缓存

`android.nonFinalResIds=false
android.enableBuildCache=false
org.gradle.caching=false
kotlin.incremental=false`

0

评论 (0)

取消