- 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.
- 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:
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
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"
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
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:
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
- A more in-depth HelloWorld sample can be found at the Android website:
- Also some more intersting application development articles: