Search code examples
androidandroid-studioapk

Android Studio Signed APK ':app:transformClassesAndResourcesWithProguardForRelease'


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 ?


Solution

  • Try performing a clean build (Build > Clean Project) and buliding again.

    If that doesn't work, it's likely Proguard is removing some important classes and/or libraries in your app. Take a look at the warnings generated above the error message in the log. You'll need to add rules to your proguard-rules.pro file to keep the necessary classes. Here is an example of the rules required to keep the Butterknife library.