• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

R8/Progaurd Advice Please

Brian Berry

Well-Known Member
I just learned to use R8/Progaurd but I only know 1 rule....could somebody share rules that would be good for me to intially add to the progaur-rules.pro file? Maybe a link to a good rules webpage?



Code:
-printusage /home/tyme/r8_usage.txt
 
I just learned to use R8/Progaurd but I only know 1 rule....could somebody share rules that would be good for me to intially add to the progaur-rules.pro file? Maybe a link to a good rules webpage?



Code:
-printusage /home/tyme/r8_usage.txt

You don't need to add any rules unless proguard breaks your code by removing classes your project needs. If proguard removes any classes and causes your app to crash, then add those classes as rules.

I know from experience that ShareActionProvider and some parts of Adsense break, so you need to create rules for those if you use them.

Here's where I listed all my proguard rules toward the bottom of the page and show how to reduce apk size...
https://techstop.github.io/reduce-apk-size/
 
Back
Top Bottom