How to create build.xml file for Android?

I am trying to run simple programs that I got directly from downloading the source code for the book "Getting Android 4". However, I have many problems with build.xml files (see previous questions that go unanswered). My last one is what comes from a simple Label demo program:

# ant debug Buildfile: /home/me/src/ANDROID/MyProjects/Label/build.xml BUILD FAILED Target "debug" does not exist in the project "LabelDemo". 

Then I checked with other working files build.xml and as fasr, as I can say, grepping through the text of the file, "debug" does not exist there either. But they work.

So, I obviously should incorrectly create build.xml files. What is the correct way to create an assembly file for an Android project (from the command line).

+25
android ant android-build
Mar 30 '13 at 13:10
source share
1 answer

Run android update project -p ... , where ... is the path to the project. This will create or update the build.xml files and related command line files. This assumes your SDK tools/ directory in your PATH ; otherwise, you will need to fully define the path to the android command.

+65
Mar 30 '13 at 13:13
source share



All Articles