after a lot of tutorials regarding jenkins and android I still got stuck in having an error free build.
I did follow these tutorials:
http://www.vogella.com/articles/Jenkins/article.html
https://wiki.jenkins-ci.org/display/JENKINS/Building+an+Android+app+and+test+project
The only difference to my setup is that I'm not checking out from a repository. I have the code imported in the job itself, so in my "jobs" directory I do have a workspace with 2 projects (normal android and androidUnitTest project).
When trying to build I got this log:
-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.'
resulting in this error:
/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)
Seems to me like it ignores the relative path I used at Invoke Ant
("./XJenkins/build.xml", target: debug)
Does anyone have any hint, tip or solution for this? That'll be really great!
EDIT:
I previously had the situation where I had a different error (I used some more parameters for ant as mentioned in the tutorial.) The error was this: /Users/Shared/android-sdks/tools/ant/build.xml:392: Problem: failed to create task or type checkenv
... would that be a better approach?