Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plumber AssertionError on startup #2049

Closed
jzbrooks opened this issue Jan 5, 2021 · 1 comment · Fixed by #2050
Closed

Plumber AssertionError on startup #2049

jzbrooks opened this issue Jan 5, 2021 · 1 comment · Fixed by #2050
Milestone

Comments

@jzbrooks
Copy link
Contributor

jzbrooks commented Jan 5, 2021

Description

The app crashes on startup because of EnumSet reflection in the plumber artifact. R8 shakes all of the relevant fixes.

Reopens #1899 for visibility.

Steps to Reproduce

leakcanaryr8.zip

Build a release apk, install it, and run the app.

Expected behavior: [What you expect to happen]
The app to run and plumber to be setup properly.

Version Information

  • LeakCanary version: 2.6
  • Android OS version: 11
  • Gradle version: 6.7.1

Additional information

#1914 solves the problem, but there might be a slightly more specific rule. It keeps all of the enum cases in perhaps a indirect way. It explicitly keeps the thing that EnumSet depends on, though.

-keepclassmembers,allowoptimization enum leakcanary.AndroidLeakFixes {
    public static **[] values();
}
@pyricau
Copy link
Member

pyricau commented Jan 5, 2021

Thx!

@pyricau pyricau added this to the 2.7 milestone Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants