小编Iai*_*KER的帖子

ProGuard - org.codehaus.jackson.map.JsonMappingException:找不到合适的类型构造函数

我有一个基于Android的应用程序,它使用Rest服务连接到Google App Engine,该应用程序完美运行,直到它在发布之前通过ProGuard进行模糊处理.

运行混淆应用程序时LogCat中报告的错误是:

Unable to convert a [application/json,UTF-8] representation into an object of 
  class com.enterprisemk.android.bcw.bincollection.WasteCollectionAreasContainer

org.codehaus.jackson.map.JsonMappingException: No suitable constructor found 
  for type [simple type, class 
  com.enterprisemk.android.bcw.bincollection.WasteCollectionAreasContainer]: 
  can not instantiate from JSON object (need to add/enable type information?)
Run Code Online (Sandbox Code Playgroud)

我在proguard-project.txt文件中有以下内容:

-keepattributes *Annotation*,EnclosingMethod

-keep public class org.w3c.** {public private protected *;}
-dontwarn org.w3c.**

-keep public class org.joda.time.** {public private protected *;}
-dontwarn org.joda.time.**

-keep public class org.restlet.** { *; }
-dontwarn org.restlet.**

-keep public class org.codehaus.** { *; }
-dontwarn org.codehaus.**

-keepattributes …
Run Code Online (Sandbox Code Playgroud)

android restlet proguard

5
推荐指数
1
解决办法
2450
查看次数

标签 统计

android ×1

proguard ×1

restlet ×1