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
. . . . . . . . . .


...全文
339 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
参宿_七 2019-01-04
  • 打赏
  • 举报
回复
你好,我想问问在把java项目打包成exe的时候,怎么把第三方的jar包一起包含进去呢
一二菲菲 2016-02-21
  • 打赏
  • 举报
回复
没人接触过这方面的么
一二菲菲 2016-02-19
  • 打赏
  • 举报
回复
请了解过的帮忙看下。。
Visual Studio Code 是由微软开发的一款免费、开源、跨平台的现代化轻量级代码编辑器,自发布以来迅速成为全球开发者最受欢迎的工具之一。它结合了编辑器的轻便性和集成开发环境(IDE)的强大功能,支持多种编程语言和开发场景,核心特点: 1. 跨平台支持 可在 Windows、macOS 和 Linux 上运行,保持一致的用户体验。 2. 轻量级与高性能 启动速度快,占用资源少,适合处理大型项目或低配置设备。 3. 智能代码补全 内置 IntelliSense(智能感知),提供代码提示、参数信息、快速修复等功能,支持 JavaScript、TypeScript、Python、C++ 等主流语言。 4. 内置终端 直接在编辑器内打开集成终端(支持 PowerShell、CMD、Bash 等),方便执行命令行操作。 5. 调试工具 内置调试器,支持断点、变量监视、调用堆栈查看等,无需离开编辑器即可调试代码。 6. Git 集成 直接通过侧边栏管理 Git 仓库,支持提交、分支切换、冲突解决等操作。 7. 丰富的扩展生态系统 通过 Extensions Marketplace 可安装数千款插件,扩展功能包括: 语言支持:如 Java、Go、Rust 等。 主题与图标:自定义界面风格。 工具集成:如 Docker、Kubernetes、数据库连接等。 效率工具:如 REST Client、Live Server 等。 8. 自定义与主题 支持修改键盘快捷键、界面主题、文件图标等,打造个性化开发环境。 9. 多光标编辑 按住 Alt(Windows/Linux)或 Option(macOS)点击可添加多个光标,同时编辑多处代码。 10. 远程开发支持 通过 Remote - SSH、Remote - Containers 等扩展,可直接连接远程服务器或开发容器,实现无缝协作。

51,397

社区成员

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

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