4
我有一个android应用程序,它在项目的/ libs /目录中有dnsjava.jar。一切都很好,可以打包成APK(没有proguard)。使用DNSJava库混淆Android代码的Proguard
然而,当我介绍的ProGuard到project.properties(在eclipse),我得到以下警告:
[2013-03-07 14:16:08 - ] Proguard returned with error code 1. See console
[2013-03-07 14:16:08 - ] Warning: org.xbill.DNS.spi.DNSJavaNameServiceDescriptor: can't find superclass or interface sun.net.spi.nameservice.NameServiceDescriptor
[2013-03-07 14:16:08 - ] Warning: org.xbill.DNS.spi.DNSJavaNameServiceDescriptor: can't find referenced class sun.net.spi.nameservice.NameService
[2013-03-07 14:16:08 - ] Warning: org.xbill.DNS.spi.DNSJavaNameServiceDescriptor: can't find referenced class sun.net.spi.nameservice.NameServiceDescriptor
[2013-03-07 14:16:08 - ] Warning: org.xbill.DNS.spi.DNSJavaNameServiceDescriptor: can't find referenced class sun.net.spi.nameservice.NameService
[2013-03-07 14:16:08 - ] Warning: org.xbill.DNS.spi.DNSJavaNameServiceDescriptor: can't find referenced class sun.net.spi.nameservice.NameService
[2013-03-07 14:16:08 - ] You should check if you need to specify additional program jars.
[2013-03-07 14:16:08 - ] Warning: there were 5 unresolved references to classes or interfaces.
[2013-03-07 14:16:08 - ] You may need to specify additional library jars (using '-libraryjars').
[2013-03-07 14:16:08 - ] java.io.IOException: Please correct the above warnings first.
[2013-03-07 14:16:08 - ] at proguard.Initializer.execute(Initializer.java:321)
使用-keep类org.xbill ** {*; }在proguard-project.txt似乎并没有解决这个问题。
嗨如何启用ProGuard的设置,你的应用程序在Eclipse ........ – androidgeek 2013-03-07 06:31:48
嗯,阅读四周,发现添加-dontwarn org.xbill。**似乎解决这个问题。哎... – Pell 2013-03-07 06:36:03
尝试在您的proguard.config文件中添加'-dontwarn'标记。 – GrIsHu 2013-03-07 06:38:08