Error after update. Gradle Dependency Cache May Be Corrupted

I updated my android studio from 2.2.3 to 2.3. Ever since i get it

Error:

Failed to open zip file. 
Gradle dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) 
<a href="syncProject">Re-download dependencies and sync project (requires network)</a> 
<a href="syncProject">Re-download dependencies and sync project (requires network)</a>
.....

I can’t find a solution for it, despite searching again and again

+4
source share
2 answers

This problem occurs when Android studio cannot access the gradle.zip file. The easiest way to resolve this is to keep track of what the studio tells you to do, in which case it says to reload the dependencies. Due to a very minor glitch, this does not work.

To solve this problem:

  • Go to gradle -wrapper.properties from the project side menu
  • Then change:

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

, zip , "gradle -3.3-all.zip"

, .

  • zip gradle-3.3-all.zip
  • zip .
  • , ".gradle" ( "C:\Users\user.gradle", ).
  • "wrapper", "gradle -3.3-all".
  • zip , , zip .

" ".

. , . . !!

+8

MAC-

rm -Rf ~/.gradle
+2

Source: https://habr.com/ru/post/1671518/


All Articles