Missing type parameter RuntimeException
See original GitHub issueGson 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.
Fatal Exception: java.lang.RuntimeException
Missing type parameter.
com.google.gson.reflect.TypeToken.getSuperclassTypeParameter (TypeToken.java:84)
com.google.gson.reflect.TypeToken.<init> (TypeToken.java:62)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:11 (1 by maintainers)
Top Results From Across the Web
java.lang.RuntimeException: Missing type parameter [closed]
The class TypeToken requires a type parameter. Looking at your code, it looks like you should replace. Type listType = new TypeToken() {...
Read more >TypeToken instantiation with generic list throwing ...
Using Gson 2.0, this code throws "java.lang.RuntimeException: Missing type parameter." on line [Type t = new TypeToken<List<String>>() {}.getType();]:.
Read more >Android – proguard Missing type parameter – iTecNote
i try obfuscate my code of android app with ProGuard . But after this my app give exception at running: 11-15 01:46:26.818: W/System.err(21810):...
Read more >Mobile-Xamarin App integrates with New Relic
agent.andriod.SaveState. Caused by java.lang.RuntimeException.Missing type parameter at com.newrelic.com.google.generateTypeToken at com ...
Read more >android System.err: java.lang.RuntimeException: Missing type ...
DemoApp W/System.err: java.lang.RuntimeException: Missing type parameter. at bji.getSuperclassTypeParameter(Unknown Source) at com.example.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.