对于版本 4.10.1,Gradle 的依赖项缓存可能已损坏(这有时会在网络连接超时后发生.) [英] Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) for Version 4.10.1
问题描述
Gradle 的依赖缓存可能已损坏(这有时发生在网络连接超时之后.)
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
我在更新 android 插件后遇到了这个问题.
I got this issue after updating the android plugin.
请帮忙.
我尝试将 gradle 版本更改为 4.6(distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip) 并且它也可以工作,但我想使用推荐的 gradle-4.10.1 (distributionUrl=https://services.gradle.org/distributions/gradle-4.10.1-all.zip) 版本.
I tried to change the gradle version to 4.6(distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip) and its working too, but I want to use the recommended gradle-4.10.1 (distributionUrl=https://services.gradle.org/distributions/gradle-4.10.1-all.zip) version.
推荐答案
好吧,我解决了这个问题.
Well I resolved the issue.
删除 ~/.gradle/wrapper/dists/gradle-4.10.1-all 文件夹,然后在android studio中重建项目.
Remove the ~/.gradle/wrapper/dists/gradle-4.10.1-all folder and then rebuild the project in android studio.
rm -rf ~/.gradle/wrapper/dists/gradle-4.10.1-all
这会删除损坏或部分下载的 gradle-4.10.1-all.
This removes the corrupted or partially downloaded gradle-4.10.1-all.
这对我有用.
这篇关于对于版本 4.10.1,Gradle 的依赖项缓存可能已损坏(这有时会在网络连接超时后发生.)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!