September 2, 2011

Starting a New Program in Android on Eclipse

Figure 12-3

Last week, we discussed downloading programs like Eclipse in order to create Android programs. Today, I’ll discuss how to get started on your first Android program.

If you open up the Eclipse Workbench, you will see a screen with the Package Explorer on the left and the Editor in the center. There are other screens around it, and I’ll get to it in later posts. They won’t figure in here now.

Your first step is to open up a project to work with Android SDK. For that, you need to Select Windows, then Preferences. You will then see a tab marked “SDK location”, and you have to hit “Browse” to find the directory with the Android SDK, wherever you put it.

You will then need to go into File, hit New, and select Android Project. You should see a menu like you see in the image.

From here, you can select your project name, which can be anything you want. From there, you can select “Create new project in workspace”, if you want to create a new project from scratch. You can also create a project from an existing sample. Yes, Android SDK has a lot of samples that you can use under the samples folder.

You will then need to select your Build Target, which is nothing more than selecting which version of Android that you want for your project. Considering that Android is backwards compatible for its lower versions, you might want to use the lowest version you can. I recommend Version 1.6, as a lot of cheap Boost Mobile phones use lower versions of Android. You definitely want to make certain that you application reaches as many Android devices as possible, and if you make it so only higher versions can play it, you will have less downloads.

From there, it is as easy as filling out the Application name, which will appear on the top of the Android device’s screen.

The Package name is what will be used for creating a Java package. You can separate package names by periods, like New.Project.

The Create Activity is a way of activity class is a collection of code that controls your UI (User Interface).

As for the MinSDK Version, this should match with your target build. You will notice that the number corresponds with a select version of Android.

From there, it will open up a new Android program that you can start to edit. I’ll detail how to do that next week when we discuss the basics of Android programming.

About the Author



yourDSA, your number one source of assistance and support.


One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>