I have an app which contains a total of 10 projects: 3 java projects, 6 Android projects, and one Android app project. I can build them in Eclipse without errors, but when I build them in Jenkins, the build fails during compilation of the last project.
Here are the shell commands that I’m using to do the build.
Just to be clear, DrawCard and CameraModule are libraries that are invoked by CC_library3.0.3, and CC_library3.0.3 is a library project invoked by MainApp.
android update lib-project -p ./DrawCard -t "android-15"
android update lib-project -p ./AppStar -t "android-15"
android update lib-project -p ./CameraModule -t "android-15"
android update lib-project -p ./CC_library3.0.3 -t "android-15"
android update lib-project -p ./ISAd -t "android-15"
android update lib-project -p ./Payment -t "android-15"
android update project -p ./MainApp -t "android-15" -l ../CC_library3.0.3 -l ../ISAd -l ../Payment
echo 'source.dir=../android-vcard/src' > ./DrawCard/ant.properties
echo 'source.dir=../TianShu/src' > ./MainApp/ant.properties
echo 'source.dir=../Log4A/src' >> ./MainApp/ant.properties
cd ./MainApp
ant all clean debug
After those commands, when building MainApp, the process fails with this message:
[javac]Compiling 22 source files to /var/lib/jenkins/foobar/bin/classes
[javac]A.java : package a.b.c does not exist
....
[javac]B.java : can not find symble
.....
BUILD FAILED
I don’t understand why I’m getting this error. I checked the /bin folder of all 6 lib-projects. Each contains a classes.jar file. Why is this happening and what can I do about it?
I don’t think that you can submit multiple libraries in the same call of
android update projectlike you did. I think each entry of-lsilently overwrites the previous ones.Try running the command once for each library instead:
After that open your
./MainApp/project.propertiesand make sure you have the following entries: