The most straightforward manner to create an Android application is to utilize the services of the Android Project Wizard, which is part of the ADT plug-in. The wizard provides a simple means to define the Eclipse project name and location, the Activity name corresponding to the main UI class, as well as a name for the application. Of importance also is the Java package name under which the application is created. Once this application is created, it is easy to add new classes to the project.
NOTE In this example, we are creating a brand-new project in the Eclipse workspace. This same wizard may be used to import source code from another developer, such as the sample code for this book. Note also that the specific screens may vary over time as the Android tools mature.
Figure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard.
TIP You will want the package name of your applications to be unique from one application to the next.
Clicking Finish creates our sample application. At this point, the application compiles and is capable of running on the emulator—no further development steps are required. Of course, what fun would an empty project be? Let's flesh out this sample application, our Android Tip Calculator.
Was this article helpful?