Android Studio Signed APK ':app:transformClassesAndResourcesWithProguardForRelease'

Viewed 10672

When I try to generate signed in Android Studio, I've got the following error :

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: Please correct the above warnings first.

Already make some research and find that for example :

Error:Execution failed for task ':android:transformClassesAndResourcesWithProguardForRelease'

I followed the advice, it didn't works. So, I tried to update my buildToolsVersion to 23.0.2.

Didn't work too.

It's works only when I modify minifyEnabled to false, and I don't want to.

Can you give me a track please ?

4 Answers

I had this error, and I don't know why it happened.

I have tried lot of solutions without success.

Except adding these lines to my ProGuard file (proguard-rules.pro) :

-ignorewarnings

-keep class * {
    public private *;
}

Then Clean and Rebuilt, then generate release apk.

Thanks to Rahul...

Add this line in proguard-rules.pro

-keepattributes EnclosingMethod

Update your Gradle plugin and it will work.

Related