我通过 android create uitest-project 生成一个 build 文件后,用 ant build 命令打包,可是报:ant build 具体代码如下:

:ant build
Buildfile: E:\Eclips\Demo\build.xml
-check-env:
 [checkenv] Android SDK Tools Revision 25.2.2
 [checkenv] Installed at D:\android sdk
-build-setup:
[getbuildtools] Using latest Build Tools: 21.0.2
     [echo] Resolving Build Target for Uiautom...
[getuitarget] Project Target:   Android 5.1.1
[getuitarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
-pre-compile:
compile:
-post-compile:
-dex:
      [dex] input: E:\Eclips\Demo\bin\classes
      [dex] Converting compiled files and external libraries into E:\Eclips\Demo\bin\classes.dex...
       [dx] no classfiles specified
BUILD FAILED
D:\android sdk\tools\ant\uibuild.xml:198: null returned: 1
Total time: 0 seconds

然后,uibuild.xml 文件 198 处代码为:

193 <!-- Converts this project's .class files into .dex files -->
194<target name="-dex" depends="compile, -post-compile">
195 <dex executable="${dx}"
196 output="${intermediate.dex.file}"
197 nolocals="@{nolocals}"
198 verbose="${verbose}">
199 <path path="${out.classes.absolute.dir}"/>

,请大神们指导


↙↙↙阅读原文可查看相关链接,并与作者交流