Gradle 5.1.1 update breaks my proguard rules in Android Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Gradle 5.1.1 update breaks my proguard rules in Android without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I updated my gradle version to 5.1.1 and suddenly it broke some of my proguard rules (app crashes). An example would be this library that I use: https://github.com/LeonardoCardoso/Android-Link-Preview

I applied the proguard rule:

-keeppackagenames org.jsoup.nodes

Which was working before (v4.10.1 and below) but now it broke and it gives this error:

java.lang.IllegalStateException: Could not read resource entities-xhtml.properties. Make sure you copy resources for cMb

My question is, did you add any special rules when you are updating your version to 5.1.1? I know that starting from this version of Android Studio (3.4) it comes with R8 as well.

Answer

Was resolved by adding

-keep class org.jsoup.**

We are here to answer your question about Gradle 5.1.1 update breaks my proguard rules in Android - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji