Your decision to start development on a new platform depends on how easy it is to write a “Hello World”. This tutorial helps you set up the development environment and write “Hello World” in few easy steps. This tutorial assumes that you are already familiar with eclipse and its installation.
Step 1: Set up Eclipse
You can get the latest version of Eclipse from Eclipse Downloads. I am using Eclipse Classic 3.7.2 for windows for this tutorial. If you plan to install 64-bit version, make sure you have latest 64-bit version of Java Development (JDK) installed.
Step 2: Install Android Development Tools (ADT) Plugin
First we need to install Eclipse Plugin named Android Development Tools (ADT).
Its very simple to get this plugin installed. Just Open Eclipse IDE , go to Help>Install New Software…
An Install window will appear with Available softwares. Now enter following link provided by Google in “Work with” field:
A new update link will appear put a check mark and click on Next to start installation. After installation the Eclipse IDE would require a restart.
Step 3: Install Google Android SDK
There are two ways to get and install Google Android SDK.
1. Install new SDK (Recomended)
A “Welcome to Android” window appears for SDK configuration when Eclipse restarts after ADT plugin installation (Step 2). You can choose between installing new SDK or use existing. If you choose first option, it will automatically download and configure SDK with Eclipse. You can also get SDK platform (Android APIs) version of your choice. Second option will allow you to locate SDK manually if you already have downloaded it.
2. Use existing SDKs
If you skip above, you can Download Android SDK in zip format and configure it using preferences window Window > Preferences. Here you select Android from left side bar and set SDK location manually.
Android SDK Manager Window > Android SDK Manager allows you to get any version of Android Platform any time. You can also get documentation, sources, samples and other stuff here.
Step 4: Create New Android Virtual Device (AVD)
Now we need to create a virtual device to run Android Application on Android Emulator. Go to Window >AVD Manager and select Virtual Devices. Click on New to create a Virtual Device, give it some Name and select Target Android Platform from the drop down list. If you are using 4.x.x version of Android Platform you need to get ARM EBI v7a System Image using Android SDK Manager (see the previous image) to create virtual device.
Step 5: Create First Android Project
Create a new Project File >> New >> Project , a new wizard will appear to select project type, select Android Project from Android and click Next from the wizard. Now you are to specify Project Name. A directory with this name would be created in yous system. Next is the Package Name the namespace actually where all your code will go. Standard domain style is used for naming. Then Activity Name it is the name of the class that is created by ADT, the plugin we installed. And Application Name that will appear as title of your app. For example my settings are like:
Project Name: AndroidHelloWorld
Package Name: com.getsolved.android
Activity Name: HelloWorld
Application Name: My Hello World App
Now Click on Finsh. If the Finish button is inactive make sure that your are not missing any information discussed above and the Pakage Name follow the domain style.
Step 6: Run the App
Now click on dropdown next to run button, select Run Configurations, Double Click on Android Application, it will create new configuration. At right side just browse the the application you just created and click on Run button. Here you will see your output.
Ukraine translation by Android SDK – http://softdroid.net/google-android-hello-world-with-eclipse