-4

It shows the following error:

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)
1:build.gradle

halfer
  • 19,824
  • 17
  • 99
  • 186
Ayan
  • 1

2 Answers2

1

Hi I was facing the same issue. Few points you can verify :

  1. It may be your internet connection issue so check your internet connection is working well.
  2. This can be solve by Perform invalidate cache/ Restart
  3. If above 2 options are not wokring you need to reload the the dependencies so perform rm -rf $HOME/.gradle/caches/ and ./gradlew build --refresh-dependencies.

Perform these both commands and reverify your gradle path. This may solve your problem.

Jared Forth
  • 1,577
  • 6
  • 17
  • 32
0

The solution is very simple, just connect to internet and sync again build.gradle file.

Prasad Patil
  • 117
  • 1
  • 10