我正在尝试在我的
Android项目中添加第三方库(JmDNS).
我在基础项目目录下创建了一个文件夹’libs’,并将jar文件放在目录中.
当我尝试使用Ant(ant release)构建他的项目时,我收到一个’重复的定义’通知,看起来是JmDNS jar文件中的每个类.
.... [proguard] Note: duplicate definition of library class [javax.jmdns.impl.tasks.state.Canceler] [proguard] Note: duplicate definition of library class [javax.jmdns.impl.tasks.state.DNSStateTask] [proguard] Note: duplicate definition of library class [javax.jmdns.impl.tasks.state.Prober] [proguard] Note: duplicate definition of library class [javax.jmdns.impl.tasks.state.Renewer] [proguard] Note: duplicate definition of library class [javax.jmdns.impl.tasks.state.package-info] [proguard] Note: duplicate definition of library class [javax.jmdns.package-info] [proguard] Note: there were 357 duplicate class definitions.
BUILD Failed /path/Tools/ant-android-scala/build-scala.xml:183: Can't write [/path/bin/projectname-debug-shrinked.jar] (Can't read [/path/projectname/libs/jmdns.jar(;;;;!Meta-INF/MANIFEST.MF,!library.properties)] (Duplicate zip entry [jmdns.jar:javax/jmdns/JmDNS$Delegate.class]))
我确定jar文件只包含一次,没有其他的方式,我包括重复的源文件在项目的任何地方.
Proguard为什么还会抱怨重复的定义?