Starting Android Development Part 1: Setting Up a Project in Eclipse
December 30, 2009 3 CommentsSo, you’ve got an Android Device. You’ve got the SDK set up. Now what? In the next few posts, I’m going to walk you though creating your very own Android application from scratch.
To do that, I’m going to assume the following:
- You have your Android SDK setup
- You know a little something about programming in Java
- You’re willing to leave comments if some of my instructions are unclear
All right . . . ready to start?
Setting up a new project in Eclipse
Each program you write for Android will be contained in its own ‘project’ from Eclipse’s point of view. This makes sure that the code is stored properly in its own little folder.
- Select File > New > Project
- From the resulting wizard, chose Android > Android Project (See picture below)
- The next screen will allow you to set up most of the important values that Eclipse needs. Here’s a quick explanation on what they mean:
- Project Name: This is the name that the project will have in your workspace.
- The Contents box determines where the source files (your .java, .dex, and other files) are going to be stored.
- The Build Target box allows you to select which version of Android you’re shooting for. Since I’m using some old code for this project, I’m going to use Android 1.5 as the target — meaning that this program will theoretically run on all Android devices 1.5 and above . As of right now, I build most of my projects to run on 1.5 / 1.6 and test for all versions of Android that are out there on devices (1.5 / 1.6 / 2.0).
- Application Name: Give your application name here. This will be stored under a special variable that we’ll see later.
- Package Name: Java code is organized in packages. Enter a package name here. The package name will lend itself to the folder hierarchy in which source code is stored. For example, a package name of com.droidweb.temperature means that the code will be stored in com/droidweb/temperature/.
- Create Activity: Android program flow is controlled by activities. Check the box if you want a default activity to launch when your program opens (99 times out of 100 you do), then give it a name in the text box. See the picture below if this is unclear.
- Min SDK Version: This will automatically fill in based on your Build Target chose. This is the minimum SDK version code on which your program will run. Each version of the Android SDK has a version number as outlined in the table below:
| SDK Name | Version Number |
| 1.0 | 2 |
| 1.5 (Cupcake) | 3 |
| 1.6 (Donut) | 4 |
| 2.0 (Éclair) | 5 |
Click Finish once you’ve filled in all the appropriate information. Stay tuned for our next post: I’ll begin to explain the structure of your Android project.
|
|
|
|
|
![]() |
Android Development Corner, Programming



[...] Starting Android Development Part 1: Setting Up a Project in … [...]
[...] more: Starting Android Development Part 1: Setting Up a Project in … By admin | category: android, android sdk | tags: few-posts, sdk, the-next, [...]
[...] Part One of Starting Android Development, we discussed setting up your project in Eclipse. Now it’s [...]