Ice-Tea
Ice-Tea

Reputation: 1

ant android change path to build.xml

i am new to android and ant, i created an android app that i'd like to build using ant. I did an android update project --path . which worked like a charm. Now i want to move the ~/projects/myandroidapp/build.xml to ~/projects/build_my_app.xml When i run ant on this file i receive java.io.FileNotFoundException: /home/user/projects/AndroidManifest.xml (No such file or directory) I manipulated every reference to AndroidManifest.xml in former build.xml and main_rules.xml i found but did not find a solution.

Maybe there is someone out there who already faced this problem.

Upvotes: 0

Views: 1101

Answers (2)

riwnodennyk
riwnodennyk

Reputation: 8268

Try mentioning the basedir attribute in your <project> tag.

E.g. your build.xml could look like this:

<project name="MyProject" basedir="myandroidapp/">
...
</project>

Upvotes: 1

Raghuram
Raghuram

Reputation: 52665

Rather than include the android build script inside the global build file, you could call the ant task of the android build from the global build.

<ant antfile="myandroidapp/build.xml" target="mytarget"/>

This will segregate the builds of each subproject and simplify the main build file.

Upvotes: 0

Related Questions