Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease' while generating APK

半城伤御伤魂 提交于 2019-12-04 19:06:53

Finally, I have found that MPAndroidChart has a document in which tells you how to configure Proguard.

With the following configuration:

-keep class com.github.mikephil.charting.** { *; }
-dontwarn io.realm.**

I was able to create the obfuscate APK without any warnings.

Also, I have noticed that itextpdf was a library that I used on the past but I did not need it nowadays so I just have to delete it from the dependencies on my gradle file and the warnings also have dissapeared.

Droid Genie

I found a solution for this issue during apk generation.

Open build.gradle(app) and change build type as following.

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt')
    }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!