Does anyone know the keep statement that needs to be added to Proguard for Google Analytics?
I have this line right now but for some reason nothing is being reported...
# google analytics, uncomment if using:
-keep class com.google.android.apps.analytics.PipelinedRequester$Callbacks
R8 is having a faster processing time than Proguard which reduces build time. R8 gives better output results than Proguard. R8 reduces the app size by 10 % whereas Proguard reduces app size by 8.5 %. The android app having a Gradle plugin above 3.4.
ProGuard is a tool to help minify, obfuscate, and optimize your code. It is not only especially useful for reducing the overall size of your Android application as well as removing unused classes and methods that contribute towards the intrinsic 64k method limit of Android applications.
However, you can disable certain tasks or customize R8's behavior through ProGuard rules files. In fact, R8 works with all of your existing ProGuard rules files, so updating the Android Gradle plugin to use R8 should not require you to change your existing rules.
Android apps are quite easy to reverse engineer, so if you want to prevent this from happening, you should use Proguard for its main function: Obfuscation. The other two important functions of Proguard are Shrinking and Optimization. Shrinking eliminates unused codes and it is highly useful.
I have a generic
-keep public class com.google.** {*;}
in my proguard.cfg and Google Analytics works fine.
Try this. If this does not solve the problem, then your problem is not Proguard but rather a Google Analytics configuration or connectivity issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With