CIS 350 Software Engineering - Spring 2012

Setting up your Android environment

Before you begin
Make sure you have installed the Android environment for Eclipse before proceeding. The lab machines in Moore 207 should have everything you need, but if you are working on your own machine, start here and follow the directions.

Once you've installed everything, go through these steps to make sure you environment can run a simple "Hello, World" application:

1. Start Eclipse

2. In Eclipse, go to Window -> Preferences -> Android and make sure that the SDK location is correct.

3. If you see an SDK Target listed (it should be Android 2.3.4), then move on to the next step. Otherwise, click "OK" to leave this dialog, then go to Window -> Android SDK and AVD Manager -> Available Packages, and install an SDK Platform from the Android Repository (you should choose 2.3.4 or lower).

4. Now go to Window -> Android SDK and AVD Manager -> Virtual devices. If no AVD is listed, click New and enter the Name and Target (which should be 2.3.4 or lower).

5. Now your environment is ready. Go to File -> New -> Android Project (you may need to dig a little to find it). Specify the Project Name as "HelloAndroid", and specify the Package name as "edu.upenn.cis350" and click Finish.

6. Once the project is created, you may see some errors indicated in Eclipse within the project, but they should disappear after a few seconds. Once they have, right-click on the project name and choose Run As -> Android Application.

7. It will take the emulator a minute or so to start, so be patient. Once the Android OS boots, your program should automatically start and you should see a screen that simply reads "Hello World, HelloAndroid" or something to that effect.

If you got the "Hello, World" program to run, then you're good to go!