Mac AndroidStudio 加载项目Gradle报错问题

in 技术文档 with 0 commentand 214 read

初次加载项目时报错例如报诸如此类包含 .lock 文件错误:

Gradle could not start your build.
> Could not create service of type FileHasher using BuildSessionServices.createFileHasher().
> Timeout waiting to lock file hash cache (/Volumes/Files/ASProject/bgmdown_android/.gradle/7.3.3/fileHashes). It is currently in use by this Gradle process.Owner Operation: unknown
Our operation: 
Lock file: /Volumes/Files/ASProject/bgmdown_android/.gradle/7.3.3/fileHashes/fileHashes.lock

注意在Open项目时会询问你是否Trust该项目,上面会有一个复选框(连Folder一同信任),你需要把复选框也勾选上。
然后项目位置尽量在用户下的诸如Desktop或者是Documents文件夹下。然后就不会报错了。

截屏2022-10-17 上午8.42.35.png

评论