Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After updating to Android Studio 2.3 build gradle is not able to build

Tags:

Error:Failed to open zip file.

Gradle's dependency cache may be corrupted (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>

This happened yesterday. I'm not able to run any of my old project and I can't download this dependency though I have good internet connection.

like image 325
Abdalrahman Makahleh Avatar asked Mar 05 '17 00:03

Abdalrahman Makahleh


People also ask

Why is my Gradle build failing?

In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.


1 Answers

I had a similar issue today after updating to Android Studio 2.3.

I had to update my build tools to 25.0.0 you can do this by changing the buildToolsVersion and changing the compileSdkVersion to 25 in the build.gradle file in your main module.

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    ...
}
like image 60
Goke Obasa Avatar answered Sep 21 '22 10:09

Goke Obasa