Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
If you’ve haven’t done much Android programming before, except to follow the examples in this book, chances are that you use Eclipse to build, test, and deploy Android applications. The ADT, the Android plugin for Eclipse, does a good job of providing these functions in a graphical environment—making them easily accessible to humans. In fact, building an Android APK from your source code in Eclipse is as simple as clicking the Save button. Doing so will trigger the tool chain responsible for turning an Android Eclipse project into something that’s executable on a device.
You’d be surprised how much happens under the hood when issuing a save on a source code or resource file. We plan to build Android applications from the command line, so it’s essential that you understand what’s happening there. Hence, this first section of the chapter is meant to give you a solid understanding of the steps and tools required to build an application. We’ll wrap it up with this chapter’s first technique, which will show you how to build a typical Android application from the command line with the Apache Ant build system.