Note that there are some explanatory texts on larger screens.

plurals
  1. POlink Android Library Project from command line, Error: ...taskdef class com.android.ant.SetupTask cannot be found
    primarykey
    data
    text
    <p>I link a library project in my project.properties File of the library-consuming project</p> <pre><code>android.library.reference.1=~/Documents/Workspace/LibraryProject/ </code></pre> <p>the project.properties of the library project says:</p> <pre><code>android.library=true </code></pre> <p>I read on <a href="https://stackoverflow.com/questions/7925747/how-do-you-set-the-android-library-absolute-path-in-ant-properties">here</a> 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).</p> <p>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:</p> <pre><code>/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 </code></pre> <p><strong>EDIT</strong></p> <p>After I updated my code to Boris Answer I get another Error, but I think I´m on the right way</p> <p>here is what I do in the ant script now</p> <pre><code>&lt;target name="updateProject"&gt; &lt;echo&gt;updating Project...&lt;/echo&gt; &lt;!-- The Library --&gt; &lt;exec dir="${android_home}/tools" executable="./android"&gt; &lt;arg line="update"/&gt; &lt;arg line="project"/&gt; &lt;arg line="--target"/&gt; &lt;arg line="4"/&gt; &lt;arg line="-p"/&gt; &lt;arg line="${scannerLibrary_home}"/&gt; &lt;/exec&gt; &lt;!-- The consuming Project --&gt; &lt;exec dir="${android_home}/tools" executable="./android"&gt; &lt;arg line="update"/&gt; &lt;arg line="project"/&gt; &lt;arg line="--target"/&gt; &lt;arg line="4"/&gt; &lt;arg line="-p"/&gt; &lt;arg line="${targetdir}"/&gt; &lt;/exec&gt; &lt;antcall target="buildScanner"/&gt; &lt;/target&gt; &lt;target name="buildScanner"&gt; &lt;exec dir="${scannerLibrary_home}" executable="ant"&gt; &lt;arg line="clean"/&gt; &lt;arg line="release"/&gt; &lt;/exec&gt; &lt;antcall target="buildProject"/&gt; &lt;/target&gt; &lt;target name="buildProject"&gt; &lt;exec dir="${targetdir}" executable="ant"&gt; &lt;arg line="debug"/&gt; &lt;/exec&gt; &lt;antcall target="install"/&gt; &lt;/target&gt; </code></pre> <p>I get this error now:</p> <pre><code>taskdef class com.android.ant.SetupTask cannot be found </code></pre> <p>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:</p> <pre><code>sdk.dir=/Users/home/Documents/android-sdk-macosx </code></pre> <p>sadly no luck yet, anyone knows what`s the trouble here?</p> <p><strong>EDIT 2:</strong></p> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload