Android Proguard – Jackson的TypeReference类中的IllegalArgumentException

Android Proguard – Jackson的TypeReference类中的IllegalArgumentException,第1张

概述如果proguard用于混淆, Android应用程序崩溃.下面是堆栈跟踪. Caused by: java.lang.IllegalArgumentException: Internal error: TypeReference constructed without actual type information at a.b.a.g.b.<init>(TypeReference 如果proguard用于混淆,Android应用程序崩溃.下面是堆栈跟踪.
Caused by: java.lang.IllegalArgumentException: Internal error:   TypeReference constructed without actual type information    at a.b.a.g.b.<init>(TypeReference.java:35)    at a.c.d.q.<init>(StdCouchDbInstance.java:22)    at a.c.d.p.<clinit>(StdCouchDbInstance.java:22)

我使用的是EktorpClIEnt库(使用couchdb),StdCouchDbInstance.java是指this文件,TypeReference.java是this包.有关在Proguard配置文件中应该使用哪个选项来解决此问题的任何建议?

解决方法 我刚刚使用Proguard遇到了Ektorp依赖问题. TypeReference是通用的,-keepattributes Signature将保留通用信息.

我实际上使用了以下内容,这解决了我的问题.

-keepattributes Signature,*Annotation*,EnclosingMethod

从Proguard Examples:

The “Signature” attribute is required to be able to access generic types when compiling in JDK 5.0 and higher.

总结

以上是内存溢出为你收集整理的Android Proguard – Jackson的TypeReference类中的IllegalArgumentException全部内容,希望文章能够帮你解决Android Proguard – Jackson的TypeReference类中的IllegalArgumentException所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1136919.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存