Reputation: 32103
I thought I kind of understood proguard keep
rules but I guess I don't! I have some rules of the following form in my proguard configuration file:
-keep class de.neom.neoreadersdk.** { *; }
-keep class org.joda.** { *; }
-keep class com.google.** { *; }
-keep class android.** { *; }
I'd expect all classes and class members in the above packages to not be obfuscated (i.e. for the names to not be modified by proguard). However, I'm seeing the following warnings (and lots more besides) when proguard is run:
... [proguard] Warning: com.google.android.gms.internal.es: can't find referenced method 'void setMediaPlaybackRequiresUserGesture(boolean)' in class android.webkit.WebSettings
... [proguard] Warning: de.neom.neoreadersdk.Viewfinder14View$AdView: can't find referenced class android.webkit.JavascriptInterface
... [proguard] Warning: org.joda.time.DateMidnight: can't find referenced class org.joda.convert.FromString
Should I be worried by these warnings? What rules should I be adding to my proguard configuration to correct the issues that these warnings are alerting me to?
Upvotes: 1
Views: 2113
Reputation: 45648
Some of your libraries are referring to methods or classes that are missing from the target run-time or from the other libraries, e.g. org.joda.convert.FromString. If your application works fine anyway, you can tell ProGuard it's okay. For instance:
-dontwarn org.joda.**
See the ProGuard manual > Troubleshooting > Warning: can't find referenced class.
Upvotes: 2