I link a library project in my project.properties File of the library-consuming project
android.library.reference.1=~/Documents/Workspace/LibraryProject/
the project.properties of the library project says:
android.library=true
I read on here that I have to use relative paths. So I use the path with the tilde on the front since I read this is considered a relative path on Unix based OS, which I use (Mac OS).
however when I build my project with an Ant script (I dont post it here because it works without that line above, so I think it´s not the problem), I get the following error:
/Users/home/Documents/android-sdk-macosx/tools/ant/build.xml:545: ~/Documents/Workspace/LibraryProject/ resolve to a path with no project.properties file for project /Users/home/ApplicationAndroidBuilt
EDIT
After I updated my code to Boris Answer I get another Error, but I think I´m on the right way
here is what I do in the ant script now
<target name="updateProject">
<echo>updating Project...</echo>
<!-- The Library -->
<exec dir="${android_home}/tools" executable="./android">
<arg line="update"/>
<arg line="project"/>
<arg line="--target"/>
<arg line="4"/>
<arg line="-p"/>
<arg line="${scannerLibrary_home}"/>
</exec>
<!-- The consuming Project -->
<exec dir="${android_home}/tools" executable="./android">
<arg line="update"/>
<arg line="project"/>
<arg line="--target"/>
<arg line="4"/>
<arg line="-p"/>
<arg line="${targetdir}"/>
</exec>
<antcall target="buildScanner"/>
</target>
<target name="buildScanner">
<exec dir="${scannerLibrary_home}" executable="ant">
<arg line="clean"/>
<arg line="release"/>
</exec>
<antcall target="buildProject"/>
</target>
<target name="buildProject">
<exec dir="${targetdir}" executable="ant">
<arg line="debug"/>
</exec>
<antcall target="install"/>
</target>
I get this error now:
taskdef class com.android.ant.SetupTask cannot be found
Googling a bit, it says I have to provide the path to my android_home in the local.properties file in the library project, which I do:
sdk.dir=/Users/home/Documents/android-sdk-macosx
sadly no luck yet, anyone knows what`s the trouble here?
EDIT 2:
After deleting the build.xml file of the Library-consuming Project, the error with the SetupTask not found disappeared, but the "resolve to a path with no project.properties" from my original post shows up again. Even tho the path is correct and points to a directory with a project.property file.