ant打包java(uiautomator)项目,引用了第三方jar包,打包报错的问题

一二菲菲 一二菲菲 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<target name="-dex" depends="compile, -post-compile">
<dex executable="${dx}"
output="${intermediate.dex.file}"
nolocals="@{nolocals}"
verbose="${verbose}">
<fileset dir="${jar.libs.dir}">
<include name="java-client.jar"/>
<include name="junit.jar"/>
<include name="selenium-java.jar"/>
<include name="selenium-server-standalone.jar"/>
</fileset>
<path path="${out.classes.absolute.dir}"/>
</dex>
</target>

上面是build.xml文件,在打包的时候引入了上面四个jar包,在不引入第四个的情况下,没问题,可以成功,引入第四个之后就会报下面这个错,我在别的地方上查说是这个jar包中包含 java.* or javax.* 导致的,我看了下,里面的确是有,

然后我应该怎么修改这个jar包中的那个包名,或则有什么别的解决办法啊?求教大家
[code=java][dex] input: E:\EclipseWorkSpace\Appium\Test\bin\classes
[dex] input: E:\EclipseWorkSpace\Appium\Test\libs\java-client.jar
[dex] input: E:\EclipseWorkSpace\Appium\Test\libs\junit.jar
[dex] input: E:\EclipseWorkSpace\Appium\Test\libs\selenium-java.jar
[dex] input: E:\EclipseWorkSpace\Appium\Test\libs\selenium-server-standalone.jar
[dex] Using Pre-Dexed java-client-ee7fea9ded520fd6d08061916a2ed6ed.jar <- E:\EclipseWorkSpace\Appium\Test\libs\java-client.jar
[dex] Using Pre-Dexed junit-468f12e3f768b185bbc77a915206006b.jar <- E:\EclipseWorkSpace\Appium\Test\libs\junit.jar
[dex] Using Pre-Dexed selenium-java-8eb816fb7b06282676aa71cc03717c19.jar <- E:\EclipseWorkSpace\Appium\Test\libs\selenium-java.jar
[dex] Pre-Dexing E:\EclipseWorkSpace\Appium\Test\libs\selenium-server-standalone.jar -> selenium-server-standalone-77e32eb6dde22b0448790748c61aadf9.jar
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (bsh.CollectionManager$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (bsh.Interpreter$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (bsh.SimpleNode$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (bsh.util.AWTConsole$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (bsh.util.ClassBrowser$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (bsh.util.ClassBrowser$2) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (bsh.util.JConsole$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (com.sun.jna.Native$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (com.sun.jna.Native$4) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
. . . . . . . . . .


...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
一二菲菲
Java 51,407 成员 86,126 内容