使用Proguard时使用jackson-json库的问题

我在Android项目中使用jackson-json库,在使用Proguard进行混淆时导出应用程序时,出现以下错误:

Proguard returned with error code 1. See console Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry You should check if you need to specify additional program jars. Warning: there were 5 unresolved references to classes or interfaces. You may need to specify additional library jars (using '-libraryjars'). java.io.IOException: Please correct the above warnings first. at proguard.Initializer.execute(Initializer.java:321) at proguard.ProGuard.initialize(ProGuard.java:211) at proguard.ProGuard.execute(ProGuard.java:86) at proguard.ProGuard.main(ProGuard.java:492) 

我尝试使用项目的设置,添加“-libraryjars”以包含其他jar子和许多其他东西,但没有任何帮助。

  • EventBus和Proguard:无法调度事件
  • 如何在Eclipse中debuggingProguard混淆apk文件
  • Proguard混淆正在打破simplexml
  • Proguard是否删除未使用的代码(在Android上)
  • Android上的OrmLite Proguard
  • Proguard告诉我'请先纠正上述警告。' 如何解决外部jar子的引用?
  • Proguard问题与jar文件,如何find丢失的jar?
  • 在proguard中自定义混淆的类名称
  • 好的,我已经添加了我从多个网站收集的下一些内容:

     -libraryjars libs/jackson-annotations-2.0.0.jar -libraryjars libs/jackson-core-2.0.0.jar -dontskipnonpubliclibraryclassmembers -keepattributes *Annotation*,EnclosingMethod -keepnames class org.codehaus.jackson.** { *; } -dontwarn javax.xml.** -dontwarn javax.xml.stream.events.** -dontwarn com.fasterxml.jackson.databind.** 

    连同用于json的每个类的下一个代码(使用get&set),我认为apk正在创建但我不确定我写的是否足以让它运行良好,并且如果一些我写的不是必需的:

     -keep public class MyClass.** { public void set*(***); public *** get*(); }