在看了很多关于 jenkins 和 android 的教程之后,我仍然陷入了无错误构建的困境。
我确实遵循了这些教程:
http ://www.vogella.com/articles/Jenkins/article.html
https://wiki.jenkins-ci.org/display/JENKINS/Building+an+Android+app+and+test +项目
我的设置的唯一区别是我没有从存储库中签出。我在作业本身中导入了代码,因此在我的“作业”目录中,我确实有一个包含 2 个项目(普通 android 和 androidUnitTest 项目)的工作区。
尝试构建时,我得到了这个日志:
-build-setup:
[getbuildtools] Using latest Build Tools: 18.0.1
[echo] Resolving Build Target for MainActivity...
[gettarget] Project Target: Android 4.0
[gettarget] API level: 14
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[dependency] WARNING: unable to write jarlist cache file /Users/Shared/Jenkins/Home/jobs/Jenkins4AndroidTest/workspace/XJenkins/bin/jarlist.cache
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.'
导致此错误:
/Users/Shared/android-sdks/tools/ant/build.xml:644: java.io.FileNotFoundException: /Users/Shared/Jenkins/Home/jobs/Jenkins4AndroidTest/workspace/XJenkins/bin/AndroidManifest.xml (Permission denied)
at java.io.FileOutputStream.open(Native Method)
在我看来,它忽略了我在Invoke Ant
("./XJenkins/build.xml", target: debug)使用的相对路径
有没有人对此有任何提示、提示或解决方案?那真的很棒!
编辑:我以前遇到过不同错误的情况(如教程中所述,我为 ant 使用了更多参数。)错误是这样的:/Users/Shared/android-sdks/tools/ant/build.xml:392: Problem: failed to create task or type checkenv
......那会是更好的方法吗?