Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proguard Error when trying to export through android studio

I am trying the export signed APK with Proguard true in android studio.

I get the following error:

 FAILURE: Build failed with an exception.

 * What went wrong:
 Execution failed for task ':Application:proguardRelease'.
 > java.io.IOException: Can't write [C:\AndroidStudioProject\MyFirstProjectonAndroidWear\Application\build\intermediates\classes-proguard\release\classes.jar] (Can't read [C:\AndroidStudioProject\MyFirstProjectonAndroidWear\Application\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\classes.jar(;;;;;;!META-INF/MANIFEST.MF)] (Duplicate zip entry [classes.jar:android/support/v4/os/ParcelableCompat$CompatCreator.class]))

I have also given the following in proguard but didn't help:

-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }

Here is the proguard file that I am using:

Proguard File

like image 841
TheDevMan Avatar asked Oct 01 '22 07:10

TheDevMan


1 Answers

Today i got same error, but with picasso library. Check your gradles file and libs folder for duplicate. Like this with me, in gradle file i have compile 'com.squareup.picasso:picasso:2.3.2' (this from maven repository), but also i have file picasso-2.3.2.jar, when i deleted this file, apk file is export without error.

like image 173
waki Avatar answered Oct 04 '22 20:10

waki