-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 type parameter RuntimeException #2069
Comments
Could you please provide a minimal reproducible example? |
The issue will happen when you will try to parse json to list. But with debuggable=true it works fine. It works fine with gradle version 7.0.4 as well. |
Just to verify, your ProGuard rules contain the following, correct?
This StackOverflow question seems to describe the same issue for Gradle 7.1.0, and also contains a (slightly cumbersome and error-prone) workaround. It would it be interesting nonetheless to understand why this started appearing with Gradle 7.1.0. Unfortunately I am not so familiar with Android development, and don't have the necessary development setup at the moment. Would be great if someone more familiar with Android, or one of the Gson project members could have a look. Edit: Is this even about Gradle 7.1, or is this actually about the Android Gradle plugin 7.1.0? Maybe this is related to #1930 and to recent changes to R8 which removes generic signatures. Please verify that your rules are correct. |
yes, adding that to ProGuard rules also didn't work. Issue is when using Android Gradle plugin |
Have you also tried adding the following, which was added in #1930:
|
So I've tried to unsubscribe to these, and GitHub says I'm not subscribed. How do I get off the email chain?On Feb 6, 2022 9:11 AM, Marcono1234 ***@***.***> wrote:
Just to verify, your ProGuard rules contain the following, correct?
-keepattributes Signature
This StackOverflow question seems to describe the same issue for Gradle 7.1.0, and also contains a (slightly cumbersome and error-prone) workaround. It would it be interesting nonetheless to understand why this started appearing with Gradle 7.1.0.
Unfortunately I am not so familiar with Android development, and don't have the necessary development setup at the moment. Would be great if someone more familiar with Android, or one of the Gson project members could have a look.
—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
In my case was just adding the following to proguard configuration:
Here you go the full set of options that are needed for Gson -> https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg |
is |
@iamarjun It’s same, the name of the file is something that can change from one project to other. If you’re adding it to your proguard rules file it will work |
if anyone has the same problem, didn't gotten any solution yet, you can try this. I faced the same issue and adding these 3 lines in progurd saved my day.
|
Thanks to everyone who has commented explaining how this can be fixed with ProGuard configuration. Since this isn't a Gson issue as such, I'm going to close it. The information here will remain valuable to others running into the same problem. |
Gson version
'2.8.9'
Java / Android version
Java 11 / Android all
I'm facing following exception with Gradle version '7.1.0', whereas '7.0.4' is working fine. The issue is happening in both cases when minifyEnabled = true/false in that module, but main app module has minifyEnabled=true and proguard rules are mentioned as well.
The text was updated successfully, but these errors were encountered: