In my last post, I showed what is needed to get started programming for Android. There’s a lot that goes into setting up your machine’s environment (SDK’s, IDE’s, Plug-Ins, etc). Once that’s all done, you are probably ready to start programming in Eclipse. My first obstacle I encountered was creating a new Android Project.
When creating a new project in Eclipse, you are presented with a “New Project'” wizard. If you installed & setup all the items I mentioned in my last post correctly, you’ll have a new project type of “Android Project” in the “Android” folder. It should look similar to below:

Once you’ve selected to create an Android project, your SDK mapping will kick in and the subsequent step of the wizard will populate all the build targets for you as well as present you with a ton of project creation options. If you don’t have any build targets, you’ve not set your SDK location properly. You can do this by going to Windows >> Preferences >> Android and fill in the SDK location. Below are screenshots of the “New Android Project” step in the wizard. I’m going to go over what these project creation options are.


Project Name: This is the name of the directory where all the project files will reside. This is an "Eclipse” thing. Just make sure that your project name will be intuitive and unique.
Build Target: This is basically the minimum version of Android which your application will run on. Keep in mind that Android applications are forward compatible. So if you choose Android 2.2, it will compile against the Android 2.2 platform library, but technically it should be able to be ran on Android 3.0. So choose your minimum supported version for your target here. Pick the lowest version your application can support.
Application Name: This is the title of your application. This will be seen by your users on an Android device. It is good to be descriptive, but keep it somewhat short.
Package Name: This guy is a bit tricky. It is the namespace which your application’s source code will reside under. The tricky part is the realization that on Android devices, the package name MUST be unique. So if two applications are running under the same package name (namespace) of “HelloWorld”… bad things. As a result, there is a “domain-style” naming methodology that should be employed to keep things unique. The suggestion is to always follow a “com.companyname.packagename” type of a naming model. The “companyname” can be your organization, company, or unique name which identifies the developing entity. I’ve also read that com.google, com.android, and com.example are reserved. So stay away from those.
Create Activity: This is a class that is auto-created by the plugin which is a subclass of Android’s Activity class. The class is a stub which will be launched when your application starts up. Other activities can be created from your application, but this is the first one that the user will experience.
Min SDK Version: As I previously noted with the build target, you choose the minimum SDK version which your application will support. This option tells what the minimum API level will be along with the minimum SDK version. Each build target should have a corresponding API Level assigned. Pick the API Level for the build target you previously chose. So again, the Min SDK Version number will match the Build Target number for most applications.