Tag Archives: Failed to open zip file

Error:Failed to open zip file. Gradle‘s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Perfect solution e rror:Failed to open zip file. Gradle’s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

(the picture is found, the same problem)
reason: Download error due to network reasons

Delete the corresponding gradle package, download the gradle version again and reload it

To view the gradle version:

1. Open gradle- wrapper.properties The last line in is gradle version

2. Ctrl + Alt + Shift + s open the project structure

Download website https://services.gradle.org/distributions/

Find the corresponding version to download

My gradle address is C:// users\ lei.gradle \wrapper\dists\gradle-6.1.1-all

After replacing the downloaded gradle with the previous gradle

Restart Android stdio and it’s OK

[Soloved] Gradle sync failed: Failed to open zip file

        After the as project is opened, an error is reported as follows:
Gradle sync failed: 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)
Consult IDE log for more details (Help | Show Log) (216 ms)

The reason is that the network was disconnected during the last compilation, resulting in incomplete resource download. Open the gradle/wrapper/gradle of the project- wrapper.properties File, view the distributionurl of the current project, find the corresponding version, and then go to the setting (not the project) – build, execution,… – gradle, gradle user home of as to find the directory under the folder, Delete the folder of the corresponding version.