Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution failed for task ':app:mockableAndroidJar'

Tags:

android

gradle

I am using local gradle of version 2.4 and IntelliJ IDEA 14.1.3 When I run project from IntelliJ it runs fine but when execute gradle clean build command from command line it gives the flowing exception and build fails.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mockableAndroidJar'.
> java.util.zip.ZipException: invalid entry compressed size (expected 2051 but got 2050 bytes)
like image 542
Shahidul Avatar asked May 29 '15 19:05

Shahidul


1 Answers

This looks like an old ques which is not yet answered yet. I got into same problem, when my jar files could not be read by Android Studio and it gave me the above mentioned error.

Taking lead from the comment by -Mikhail Boyarsky I changed classpath in build.gradle file to 'com.android.tools.build:gradle:2.2.3'. Synced project and it started working.

like image 186
Maniya Joe Avatar answered Sep 19 '22 12:09

Maniya Joe