I'm trying to build an app (let's call it android-app
) with a dependency on an SDK (let's call it sdk
) via Ant. Eclipse is not installed on this computer (for reasoning, it's a CI box with Jenkins).
Both projects are in two completely separate directories side by side. android-app
is in the directory ~/.jenkins/jobs/android-app/workspace
and sdk
is in the directory ~/.jenkins/jobs/sdk/workspace
.
Let's assume both projects are "vanilla" and have not been built with Ant before. I cd
to the ../android-app/workspace
directory and run android update project -p . --library ~/.jenkins/jobs/sdk/workspace
which passes. I then cd
to the ../sdk/workspace
directory and run android update project -p .
which also passes.
At this point I cd
back to the ../android-app/workspace
directory and run ant clean build
. It fails with the error:
BUILD FAILED
/path/to/ant/build.xml:440:
/path/to/sdk/workspace resolve to a path with no project.properties file for
project /path/to/android-app/workspace
... where /path/to
is the full path to the directories. I simplified it here.
If I cd
to the sdk
workspace and open project.properties
, I receive the following:
# ProGuard
proguard.config=proguard.cfg
# Project target.
target=android-10
android.library=true
It does exist. So do all of these files:
So, why is this failing? What am I doing wrong? I tried to provide as many details as possible. Please let me know if I can provide anything additional.
Well, I encounter this problem too.
I use strace to find out what the hell is going on and found that the path you specified in project.properties will be appended with your current folder path as its prefix.
For example, /home/myfolder/project > ant debug
And the library you specified in project.properties is /path/to/library
Then, the path will become /home/myfolder/project/path/to/library
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With