Android studio导入项目时的问题(Re-download dependencies and sync project (requires network))

刚导入项目是报。Error:Failed to open zip file. Gradles dependency cache may be corrupt (this sometimes occurs after a network co

刚导入项目是报。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)

原因是和项目中gradle版本不同

解决方法是

项目中gradle   gradle-wrapper.properties,

distributionUrl=https\://services.gradle/distributions/gradle-3.3.zip

将红色部分改为自己的版本,或者下载相应的版本,在build一下,就可以。



再次导入项目的时候,可能出现

Error:Cause: https://downloads.gradle/distributions/gradle-3.3.zip


解决:

setting——Build,Execution,Deployment——Gradle——use local gradle distrbutton,选择一下gradle-3.3.zip下载的位置,apply——ok就行了










发布者:admin,转转请注明出处:http://www.yc00.com/web/1754939808a5217942.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信