Setup
- Download
Eclipse
- Download the Android SDK
- Download and install the Eclipse Android SDK plugin
- After restart of Eclipse, make sure to update your Eclipse
preferences to point to the Android SDK directory.
Hello World
- Open Eclipse, and create a new Android project:
File -> New
- In the popup dialog, enter the following:
Project name: HelloWorld
Package name: com.yourname.helloworld
Activity name: ActivityHelloWorld
Application name: HelloWorld
then hit the Finish button.
- After the project is created, expand the folder tree to show the package fully expanded like:

- Click
on ActivityHelloWorld.java, this is the main entry point into the
class. When you double-click on it you'll see its code appear in the
main code window:

- You can now right-click on the project name, and from the context menu, choose:
Run As -> Android Application
This
will startup the Android emulator which will.. emulate.. a real device
running Android. This may take several seconds to start. When the
emulator is done loading, you'll see the "Screen Locked" screen. Hit
the Menu key to unlock the emulator.
- You will see your application is already running for you. It should have a single sentence being displayed:
"Hello World, ActivityHelloWorld"
- The
application is a bit boring, you can hit the Back button on the
emulator to move back to the Android desktop to see the other default
applications that come with Android. You'll see the "HelloWorld"
application you just created in the application list. You can start it
up again now. This is how a real user would interact with your
application.
- You
can now start adding UI widgets to this shell application. The Android
SDK comes with a complete set of small sample applications built off a
HelloWorld style app which show how to progressively add more elements
to your application. Check the following path in your SDK folder:
android-sdk-windows-1.0_r1\samples\ApiDemos\src\com\example\android\apis
All
the demos in that folder can also be found running on the emulator. On
the emulator home screen / desktop, click on the API Demos icon to view
them.
- A more in-depth HelloWorld sample can be found at the Android website:
http://code.google.com/android/intro/hello-android.html
- Also some more intersting application development articles:
http://code.google.com/android/devel/index.html