ant打包java(uiautomator)项目,引用了第三方jar包,打包报错的问题
<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
. . . . . . . . . .
...全文
相关推荐
uiautomator自动化所有jar包.zip
这些jar包的使用通常涉及到Java编程,因此对Java语言的理解是必不可少的。在Android Studio中,你可以通过`Import Project`功能导入这些库,然后在代码中引用它们。
超详细搭建UIautomator环境
##### 1.4 ANT(用于编译生成jar)ANT是一个Java库和命令行工具,主要用于自动化编译任务。在搭建UIautomator环境时,使用ANT来编译源代码生成jar文件。
UiAutomatorViewer源码 (附带jar包)
这个源码版本包含了处理Android 8.0及以上系统无法获取屏幕快照的问题,同时提供了在Windows 7环境下运行所需的jar包。
超详细搭建UIautomator环境.pdf
作者建议使用Java SE 6版本,因为较高版本的JDK(例如Java 8)可能会导致编译ANT时出现问题,具体表现为“找不到类:javac1.8”的错误。
Uiautomator建立自动化测试项目和运行
- `<path>` 是项目路径地址,例如`F:\lianxi\workspace\GldProject`。- **编译生成jar包(工程目录下)** - 使用IDE或其他工具编译项目,生成jar包。


