flutter报错‘/Users/xxx/.gradle/caches/journal-1/file-access.bin‘.

更新AndroidStuido Ladybug | 2024.2.1 Canary 8后 gradle一直报lock,无法编译

bash 复制代码
used by: org.gradle.cache.internal.btree.CorruptedCacheException: Corrupted IndexBlock 254946 found in cache '/Users/xxx/.gradle/caches/journal-1/file-access.bin'.
        at org.gradle.cache.internal.btree.FileBackedBlockStore$BlockImpl.blockCorruptedException(FileBackedBlockStore.java:267)
        at org.gradle.cache.internal.btree.FileBackedBlockStore$BlockImpl.read(FileBackedBlockStore.java:236)
        at org.gradle.cache.internal.btree.FileBackedBlockStore.read(FileBackedBlockStore.java:123)
        at org.gradle.cache.internal.btree.CachingBlockStore.read(CachingBlockStore.java:100)
        at org.gradle.cache.internal.btree.FreeListBlockStore.read(FreeListBlockStore.java:86)
        at org.gradle.cache.internal.btree.StateCheckBlockStore.read(StateCheckBlockStore.java:67)
        at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.load(BTreePersistentIndexedCache.java:182)
        at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.access$1200(BTreePersistentIndexedCache.java:50)
        at org.gradle.cache.internal.btree.BTreePersistentIndexedCache$IndexBlock.find(BTreePersistentIndexedCache.java:496)
        at org.gradle.cache.internal.btree.BTreePersistentIndexedCache$IndexBlock.access$600(BTreePersistentIndexedCache.java:366)
        at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.put(BTreePersistentIndexedCache.java:144)

解决办法 删除全部lock,在终端执行下面命令, /Users/xxx/ 改成你的gradle cache路径

bash 复制代码
 find /Users/xxx/.gradle/caches/ -name "*.lock" -type f -exec rm -f {} +
相关推荐
谢斯15 小时前
编译AppFlowy
flutter
灰灰勇闯IT18 小时前
Flutter×鸿蒙深度融合指南:从跨端适配到分布式能力落地(2025最新实战)
分布式·flutter·harmonyos
x.Jessica19 小时前
关于Flutter在Windows上开发的基本配置时遇到的问题及解决方法
windows·flutter
名字被你们想完了19 小时前
flutter 封装一个 tab
flutter
AiFlutter21 小时前
Flutter实现手电筒亮度修改
flutter
食品一少年1 天前
【Day7-10】开源鸿蒙之Flutter 的自定义组件封装(1)
flutter·开源·harmonyos
勇气要爆发1 天前
【第五阶段—高级特性和架构】第六章:自定义Widget开发指南
flutter
白茶三许1 天前
【2025】Flutter 卡片组件封装与分页功能实现:实战指南
flutter·开源·openharmony
Bervin121381 天前
Flutter Android环境的搭建
android·flutter
fouryears_234171 天前
现代 Android 后台应用读取剪贴板最佳实践
android·前端·flutter·dart