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

一二菲菲 2016-02-18 09:13:09
<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
. . . . . . . . . .


...全文
277 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
参宿_七 2019-01-04
  • 打赏
  • 举报
回复
你好,我想问问在把java项目打包成exe的时候,怎么把第三方的jar包一起包含进去呢
一二菲菲 2016-02-21
  • 打赏
  • 举报
回复
没人接触过这方面的么
一二菲菲 2016-02-19
  • 打赏
  • 举报
回复
请了解过的帮忙看下。。

50,530

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧