刚导入项目是报。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.org/distributions/gradle-3.3.zip
将红色部分改为自己的版本,或者下载相应的版本,在build一下,就可以。
再次导入项目的时候,可能出现
Error:Cause: https://downloads.gradle.org/distributions/gradle-3.3.zip
解决:
setting——Build,Execution,Deployment——Gradle——use local gradle distrbutton,选择一下gradle-3.3.zip下载的位置,apply——ok就行了