-
Notifications
You must be signed in to change notification settings - Fork 13
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
Missing classes detected while running R8. #167
Comments
👋 I recently saw this error when trying to bump us to Java 17 #158 |
@nplasterer The project uses quite a few dependencies that require AGP8. What other options are there? |
Ya it's not very easy to support two AGP versions and it probably makes sense for us to just move to the latest. I'm giving a heads up to any current production integrators and then will merge #158 by Monday. |
This should be going out in the latest release https://github.com/xmtp/xmtp-android/actions/runs/7792254501 |
@nplasterer last version 0.7.10 didn't resolve problem.. |
@fabriguespe do you mind looking into this? |
@nplasterer I was able to reproduce the error if the
When Here's the error log I encountered when minifyEnabled was set to true in the example module:
@stranger11 has reported in Discord that if he sets Versions
Run command
|
Awesome thanks for reproducing I'll see what we can do to fix this for minifyed builds |
I fixed the main problem, with that configuration of @fabriguespe is enabling the obfuscation for |
I think it would be worth spiking on the work there that you linked. |
@giovasdistillery @nplasterer It doesn't work because the app crashes with exception: But if you add this rules on SDK level , maybe will another result |
To apply the proper rules for R8 we need the entries and exits of all the modules and classes in the app, for example, the models that are used to parse data from a network connection, there are some classes as |
@giovasdistillery @nplasterer you can catch this problem on your xmtp android example https://github.com/xmtp/xmtp-android/tree/main/example with R8. |
@fabriguespe @nplasterer @giovasdistillery However, I also want to highlight that this issue remained unresolved for some time. I appreciate your work on the project, but it would have been great if this problem had received attention earlier. It's a serious obstacle for users and could have been avoided with a careful look at this matter. This rules in proguard solved the problem: -keepnames class com.fasterxml.jackson.** { ; } -keep class org.xmtp.** { ; } |
@stranger11 I did a commit yesterday with an extended rules approach, I'm checking your rules and I can see that is working at least the first page for me, I had the same problem with my approach, but I'm obfuscated more code, I just sent the message in Slack, it was my bad. Could you please check the latest changes in this PR and tell me if everything is ok?, because with any approach I'm not able to create a Wallet in release mode and I'm not able to see if other parts of the app are ok |
Describe the bug
In release version catching:
Missing classes detected while running R8
Missing class java.beans.ConstructorProperties (referenced from: void com.fasterxml.jackson.databind.ext.Java7SupportImpl.())
Missing class java.beans.Transient (referenced from: void com.fasterxml.jackson.databind.ext.Java7SupportImpl.())
Expected behavior
No problems with R8 and shrinking.
Steps to reproduce the bug
The text was updated successfully, but these errors were encountered: