我已经在 debianserver 上设置了 Jenkins,我正在尝试创建第一个 android 版本,但无法调用 ant
在詹金斯配置中,我有:
Name: Java6
JAVA_HOME/usr/lib/jvm/java-6-sun
Name: AntHome
ANT_HOME/usr/share/ant
在作业配置上:
git > repo
Build step-
Ant invoke
Ant Version: AntHome
Targets: -d
build file: folder/folder/build.xml
当我建立工作时,它给了我这个错误
[folder] $ /usr/share/ant/bin/ant -file build.xml -d
/var/lib/jenkins/workspace/Project/folder/folder/build.xml:47: Execute failed: \
java.io.IOException: Cannot run program \
"/home/dims/android-sdk-linux_x86-1.0_r2/tools/aapt": \
java.io.IOException: error=2, No such file or directory
我在命令行上得到相同的结果
jenkins@host:~/workspace/Project/folder/folder$/usr/share/ant/bin/ant -d
/var/lib/jenkins/workspace/Project/folder/folder/build.xml:47: Execute failed: \
java.io.IOException: Cannot run program \
"/home/dims/android-sdk-linux_x86-1.0_r2/tools/aapt": \
java.io.IOException: error=2, No such file or directory
这个特定项目正在发生这种情况,因为我创建了其他项目并且 ant -d 有效:例如
jenkins@host:~$ android create project -n template -t android-10 -p Project -k some.pkg -a Some
Created project directory: Project
Created directory /var/lib/jenkins/Project/src/some/pkg
Added file Project/src/some/pkg/Some.java
Created directory /var/lib/jenkins/Project/res
Created directory /var/lib/jenkins/Project/bin
Created directory /var/lib/jenkins/Project/libs
Created directory /var/lib/jenkins/Project/res/values
Added file Project/res/values/strings.xml
Created directory /var/lib/jenkins/Project/res/layout
Added file Project/res/layout/main.xml
Added file Project/AndroidManifest.xml
Added file Project/build.xml
Added file Project/proguard-project.txt
jenkins@host:~$ cd Project/
jenkins@host:~/Project$ ant -d
Apache Ant version 1.8.0 compiled on M
....
[echo] unless 'nodeps' is used as well.
BUILD SUCCESSFUL
Total time: 0 seconds