新建一个项目的时候,出现以下的错误:

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)

Failed to open zip file. Gradle's dependency cache may be corrupt 错误解决解决方法:

1:打开一个可以运行的项目,查看gradle-wrapper.properties 文件中 distributionUrl 的版本号,这里是4.6-all.zip,根据正确的版本号进行修改。

Failed to open zip file. Gradle's dependency cache may be corrupt 错误解决

Failed to open zip file. Gradle's dependency cache may be corrupt 错误解决

2:接着打开 build.gradle

Failed to open zip file. Gradle's dependency cache may be corrupt 错误解决

查看classpath的版本号 ,并进行修改。

3:重新编译,成功。

相关文章:

  • 2021-05-30
  • 2021-04-24
  • 2021-10-02
  • 2021-08-30
  • 2022-12-23
猜你喜欢
  • 2021-08-25
  • 2021-04-25
  • 2021-09-18
  • 2021-12-15
相关资源
相似解决方案