Create a new Android project
Here's how to create a new Android project in Eclipse (see Figure 1):
- From Eclipse, select File > New > Project. A folder called Android should be present in the dialog if the ADT plug-in for Eclipse has been successfully installed. Expanding that folder should provide the option for a new Android project. Select it and click Next.
- You will be prompted to fill in the following details in a form:
- Project name — This is the name of your project and can be something like "HelloWorld."
- Application name — This is the name that will appear everywhere in your Android device, along with the icons in the menu, in the shortcuts, and on the title bar when you run your application. This can be something like "Hello Android."
- Package name —
com.example.helloandroidor your own private namespace. The package name follows the same rules as those in the Java language.
- Create activity — We can call it SaySomething
for our purposes here. This is the name for the class stub that will be generated by
ADT. This will be a subclass of Android's
Activityclass. An activity is simply a class that can run and do some work. It can optionally have a UI. An application may contain one or more activities. They are typically on a 1:1 relationship with the screens found in an application. An application moves from one activity to another by calling a method known as
- Min SDK version — This specifies the minimum API level required by your application. The latest one is 7.
Figure 1. Create a new Android project