Proguard issue: "DaggerApplication Can't find referenced class" (2.26)
See original GitHub issueAfter migrating to 2.26 I started getting Proguard (not R8) obfuscation error:
Warning: dagger.android.DaggerApplication: can't find referenced class com.google.errorprone.annotations.ForOverride
Warning: dagger.android.DispatchingAndroidInjector: can't find referenced class com.google.errorprone.annotations.CanIgnoreReturnValue
Warning: dagger.android.package-info: can't find referenced class com.google.errorprone.annotations.CheckReturnValue
Warning: dagger.android.support.package-info: can't find referenced class com.google.errorprone.annotations.CheckReturnValue
I’ve noticed that 2.25 publishes proguard
file within aar artifact:
but 2.26 seems to be missing it:
So if I had to guess the output of the new ProguardProcessor
doesn’t get added to output aar?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Proguard: can't find referenced class - Stack Overflow
In my case Android Studio froze while doing ProGuard on release build. I killed it. And after the restart I started to see...
Read more >Why do I get “can't find referenced class” errors?
The error means that ProGuard or R8 could not find a certain class that comes from a dependency. In general ProGuard needs all...
Read more >Shrink, obfuscate, and optimize your app - Android Developers
Code shrinking (or tree-shaking): detects and safely removes unused classes, fields, methods, and attributes from your app and its library dependencies (making ...
Read more >Troubleshooting ProGuard issues on Android - Medium
In some cases ProGuard can't know that a class or method is being used, ... See references to classes and methods in APK...
Read more >ProGuard Troubleshooting
Problems while preverifying for Java Micro Edition ... Note: can't find dynamically referenced class: ProGuard can't find a class or interface that your ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can add
-printconfiguration "build/outputs/mapping/configuration.txt"
to your project Proguard rules. Although this would not specifically state the file’s name and path included (which would be great), it would list all the commands used, with all the places that are affected by it. Quite similar to Marged Manifest view, but without IDE support.Seems like R8 will be enabled by default in AGP 4.0.0, so you can either enabled it now so that the rules get picked up correctly or add the rule yourself:
-dontwarn com.google.errorprone.annotations.**
.