Writing Your First Android App: HelloWorld

Most first time Eclipse users will be wondering how to create their first Android project. This tutorial will give you the steps on how to.

Creating Android Project
  1. Launch your Eclipse, if you haven't already.
  2. Click on File -> New -> Other... or simple press Ctrl + N on your keyboard.
  3. Toggle Android then select Android Project then click Next.
  4. Specify the following:
    • Project name: HelloWorld
    • Build Target: Android 2.1
    • Application name: HelloApplication
    • Package name: org.droidtutorials
    • Create Activity: HelloActivity
  5. Click Finish to create the project.
Correcting the X mark
  1. If you get this X mark on your project folder, do this extra step.
  2. Go to Project -> Properties.
  3. Click Apply, then click OK to close the Properties dialog.
  4. The X mark should be gone now.
Compiling and Testing HelloWorld
  1. Click Run -> Run or simply press Ctrl + F11.
  2. Select Android Application then click OK.
  3. Wait for your emulator to initialize so your App will be installed and running. Below shows the stages that the emulator goes to before finally loading your HelloWorld application.


 

If you could notice, I have waited at least 3 minutes to finally see my app running on the emulator.

That's it for now. Next part, we will discuss the files of a default project.

0 Response to "Writing Your First Android App: HelloWorld"

Post a Comment