Reproduced http://blog.csdn.net/bidgod/archive/2011/01/20/6155959.aspx
1.1 ant tool Introduction
Apache ant is a Java library and command-line tool that help building software are introduced on the official website.
You can refer.
1.2 use ant for compilation
Ant compilation depends on the build. xml file. If it is an eclipse-generated project, this file does not exist. Obviously, Google's support for ant compilation naturally won't allow us to manually generate the file. It has prepared the android Batch Processing Command for us:
The android. Bat tool under the Android-SDK-Windows \ tools directory can be called to generate the build. xml file of the sipdroid project. The call command is as follows:
Android update project-P.-T Android-8
After the call, the build. xml file will be generated in the corresponding directory for ant tool to compile the project.
Call the ant command in the directory containing buid. XML to complete compilation. The compilation result is as follows.
Use ant debug to generate an APK signed with the debug key. To compile with ant, install JDK and set the path and classpath environment variables.