So enough downloading; let’s write a program. A “Hello World!” program is traditional, and we will start with something similar to demonstrate what you need to do to create, build, and test an Android application. We won’t explore much of the Android API for this program—that’s left for the following chapters—but here we’ll get a taste for the development environment and the steps you go through to create an application for Android.
There isn’t much functionality in this program. We just want to display some text on the Android emulator window that says “Hello Android!” (see Figure 2-1).
Figure 2-1. “Hello Android” screenshot
Several components are needed to build an Android application. Fortunately, the Eclipse IDE with the Android plug-in automates a lot of the work needed to create and maintain these components. We will start by using the IDE to create a project for our application. Start up Eclipse and select “File → New → Project...” from the menu bar (be sure to select “Project...”, not “Java Project”). You’ll see a list of project types, similar to the menu in Figure 2-2.
Figure 2-2. Eclipse New Project menu
Select “Android Project” and click “Next” to get the “New Android Project” dialog box (Figure 2-3 ...