Gradle 同步失败:无法为锁定文件创建父目录 [英] Gradle sync failed: Could not create parent directory for lock file
本文介绍了Gradle 同步失败:无法为锁定文件创建父目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 android studio 中检查了一个 git 存储库,但我遇到了 Gradle 同步失败
错误.
I checked out a git repository in android studio, but I'm in trouble with Gradle sync failed
error.
当项目要构建时,android studio 报错如下:
When project wants to build, the android studio raise an error like as following:
Gradle sync failed: Could not create parent directory for lock file
C:\Users\username\.gradle\wrapper\dists \gradle-4.10.1-
all\455itskqi2qtf0v2sja68alqd\gradle-4.10.1-all.zip.lck
- 我看到了其他几乎相同问题的一些答案,但没有一个他们提供帮助.
- 我也根据上述路径删除了 .gradle 目录中的现金,但它不起作用.
- 在android studio的右上角点击
Gradle
工具,然后右键单击您的项目名称
,然后单击Refresh Gradle project
,如下所示: - In the upper-right corner of android studio click on the
Gradle
tool, then right click on theyour project name
then click on theRefresh Gradle project
as following: - 然后点击
Build ->重建项目
如下:
我该如何解决这个问题?
How can I solve this problem?
感谢你解决了这个问题,谢谢.
I appreciate you to solve this problem, thanks.
推荐答案
我找到了这个答案:
这篇关于Gradle 同步失败:无法为锁定文件创建父目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文