-
Notifications
You must be signed in to change notification settings - Fork 79
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
Gson R8 proguard rules (java.lang.runtimeexception: missing type parameter.) #79
Comments
Thank you for the fix, didn't know I was the only one with this issue. |
Thank you! Just got bit by this bug. Unfortunately made it to production 😬 and this post saved the day. |
Ran into this after upgrading to AGP 8 recently; my guess is that (in my case) this is appearing now due to R8 fullMode being enabled by default. https://r8.googlesource.com/r8/+/refs/heads/master/compatibility-faq.md#r8-full-mode has more details |
It says we have to enable R8's fullMode manually with |
When upgrading from AGP 7.x to AGP 8.x (which is the update I just did when I encountered this), the docs here say the new default value is In my case, setting |
That's great--thanks for clarifying! I'll see if this change resolves the error for me. EDIT: It worked. Thank you. |
Any news here? Is this going to be resolved or we need to go with: |
@stevdza-san I was trying to display the log on the release build.
This solves the error Thanks. |
Checklist
Description
I was using
val jwt = JWT(tokenId)
to retrieve claims from the tokenId, in the release build of my android studio project, along with R8 enabled. However I've received the following error:java.lang.runtimeexception: missing type parameter.
After adding those three lines of code in the
proguard-rules.pro
, the error disappeared:I also had to manually add Gson library to my project just to add those rules, since I'm using KotlinX Serialization library.
Is there a way for you to add those rules for Gson, when using R8, so that we don't have to?
Reproduction
val jwt = JWT(tokenId)
Additional context
No response
JWTDecode.Android version
2.0.2
Android version(s)
33
The text was updated successfully, but these errors were encountered: