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

2.8.6 breaks Android Proguard #1630

Closed
skonstant opened this issue Dec 5, 2019 · 3 comments
Closed

2.8.6 breaks Android Proguard #1630

skonstant opened this issue Dec 5, 2019 · 3 comments

Comments

@skonstant
Copy link

In my app, proguarding fails when I use gson 2.8.6, some NullPointerException, without any info, it does not even say it is from gson, but when I downgrade to 2.8.5, it is fine as it has been.

One visible warning is that "module-info.class" appears more than once. I see in some commits that you have added the module-info file in this release.

I found no workaround for proguard.

This is the proguard that is bundled with Android Studio / Android SDK, I don't know which version it is. It is possibly a bug in proguard but despite loading quite a few other libraries, it fails only with gson (I do not know if the other libraries have a module-info file in there).

odl-github pushed a commit to opendaylight/odlparent that referenced this issue Dec 10, 2019
This reverts commit edbeb3e, as
GSON 2.8.6 seems to have quite a bit of trouble:

google/gson#1601
google/gson#1602
google/gson#1608
google/gson#1630

Let's wait for the dust to settle first.

Change-Id: I7d0c7b671a31bf9bf3a1861cc56b009bd0f724b6
Signed-off-by: Robert Varga <[email protected]>
@baha2046
Copy link

you need to change your module-info.
for 2.8.5 or before its require gson;
for 2.8.6 its require com.google.gson;

@Marcono1234
Copy link
Collaborator

Can you please check if this issue still occurs with the latest Gson version? The way the module-info.class is included in the Gson JAR was changed and should hopefully now cause fewer issues. Also make sure to use the latest build tools and plugins (e.g. Gradle).

@Marcono1234
Copy link
Collaborator

Marcono1234 commented Jan 7, 2024

I am going to close this because no answer has been provided. If you still experience this with the latest Gson version, feel free to comment here again with more details.

@Marcono1234 Marcono1234 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants