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 {} +
相关推荐
lqj_本人2 小时前
Flutter&鸿蒙next 中的 Drawer 导航栏
flutter·华为·harmonyos
pb813 小时前
引入最新fluwx2.5.4的时候报错
flutter·ios
睡觉谁叫1 天前
一文解秘Rust如何与Java互操作
android·java·flutter·跨平台
lqj_本人1 天前
Flutter&鸿蒙next中封装一个列表组件
flutter·华为·harmonyos
lqj_本人2 天前
Flutter&鸿蒙next中的按钮封装:自定义样式与交互
flutter·华为·harmonyos·鸿蒙
newki2 天前
【Flutter】GoRouter的路由管理 VS AutoRouter的路由管理
前端·flutter
乐闻x2 天前
Vue 全局状态管理:Vuex 从入门到精通
前端·vue.js·flutter
Python私教3 天前
Flutter通过Flare添加2D动画
flutter
waterHBO3 天前
flutter 写个简单的界面
开发语言·javascript·flutter