Each of these lines in the Proguard file
-keep class android.webkit.** { *; }
-keep class com.facebook.ads.internal.** { *; }
-keep class com.google.android.gms.common.GooglePlayServicesUtil {*;}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {*;}
produces an Android Shrinker error:
Unresolved class name / unresolved reference in Shrinker Config file
How can these errors be fixed?
(I'm using Android Api 29 and AndroidStudio 4.0.)
Edit: When I replace the '**' wildcard by just '*', the first two error messages are gone. Also, when the '$' is replaced by a dot, the subclass AdvertisingIdClient$Info is found.
Maybe it is a bug in Android Shrinker.
-dontwarn [class_filter] Specifies not to warn about unresolved references and other important problems at all. The optional filter is a regular expression; ProGuard doesn't print warnings about classes with matching names. Ignoring warnings can be dangerous.
There is no option to switch off these warnings. The standard Android build process automatically specifies the input jars for you. There may not be an easy way to filter them to remove these warnings. You could remove the duplicate resource files manually from the input and the libraries.
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.
This is a bug that came with Android Studio 4.0 : https://issuetracker.google.com/issues/153616200
It hasn't been resolved yet, but you can temporarily remove the warning by adding
#noinspection ShrinkerUnresolvedReference
at the beginning of your Proguard file.
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