Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

错误提示:

ERROR: Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
Re-download dependencies and sync project (requires network)

一般导入别人demo不需要更改什么,但是aandroidstudio会智能判断是否需要对build gradle setting之类的文件进行修改。
一般修改项目中gradle目录下的子目录wrapper中的gradle-wrapper.properties文件

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)_第1张图片
因为本人本地的gradle版本是gradle-4.10.3-all而不是gradle-4.4-all,所以需要修改他的版本号,然后重新编译。OK,成功了!!!!

你可能感兴趣的:(Android基础)