Google Android Hello World! with Eclipse
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:
https://dl-ssl.google.com/android/eclipse/
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
34 Responses to Google Android Hello World! with Eclipse
Leave a Reply Cancel reply

Tags
Ad ADT Adword AJAX Android API balancing Binding Calling Class Column Configure Copy Curl Data Database Eclipse Error Gadget Google Hello ini ini_set Install Invite Javascript Late Linux Load Master Method MySQL Output PHP Playground Proxy Replication SeaMonkey Server Slave Static String Table Ubuntu upload_max_filesize













Hi,
I was trying to create my first Android app yesterday, also a Hello World program. Unfortunately, I am getting some errors when I try to build the project.
The ‘Problems’ section shows that there are problems with importing the ‘android’ package.
Did you face similar problems? If so how did you resolve them? Waiting for your response.
Well Mr. Vivek! Hopefully you have installed ADT(i have discussed in the post). The problem will be with the Installation of Android SDK. Please make sure that you did the step: “Installing Android SDK” exactly as i have discussed. You must have to locate the complete extracted directory instead specifying some folder inside. And make sure that the directory you specify is accepted.
Best of Luck
Have you guys seen this error?
[2009-11-03 16:15:20 - HelloAndroid]New emulator found: emulator-5554
[2009-11-03 16:15:20 - HelloAndroid]Waiting for HOME (‘android.process.acore’) to be launched…
[2009-11-03 16:16:37 - HelloAndroid]emulator-5554 disconnected! Cancelling ‘com.example.helloandroid.HelloAndroid activity launch’!
I can’t seem to run the hello world sample.
Hi,
I was trying to create my first Android app yesterday, also a Hello World program. Unfortunately, I am getting some errors when I try to build the project.
The ‘Problems’ section shows that there are problems with importing the ‘android’ package.
Did you face similar problems? If so how did you resolve them? Waiting for your response.
@Steve the tutorial has been updated please see if you have set up the environment right
You may want to see http://www.snpe.rs/sad/overview.html , especially “Hello, world” cheatsheet http://screencast.com/t/ODYxNTk5Z
Nice job done here i wud like to be say thanks to the person who post this great article here
I had a problem. When I run, there is no error, but I can only see the sentence after I push the button menu.
The emulator takes long to load and install app but it loads all automatically. As it takes long it gives feeling that the button press is doing some trick.
[...] you need to setup Google Android SDK. While creating Android Virtual Device (AVD) you can specify the storage size in SD Card settings. [...]
[...] eclipse ADT for android and the android SDK. Installing the ADT and its configurations can be found here. The SDK allows one to select the target platform hence, there is no need to download seperate SDKs [...]
i have recieved this error message please help me where is the problem
HelloAndroid] emulator-5554 disconnected! Cancelling ‘com.example.helloandroid.HelloAndroid activity launch’!
I just want to say thank you for posting these clear instructions for installing all the required components for the Android Hello World App. I started with no Eclipse installed and everything worked perfectly. When I ran the application it displayed on the Android Simulator, with no errors!
Excellent job, thanks again! Have a great day!
- Dave
thak you for your message , It’s usefull
This is the most hardest platform to say just ‘Hello World’ I have ever faced. Getting started with emulator is just a big pain, and now sdk installer update, after nothing is working… It is supposed to be easiest part to say Hello !!! I have been googling and there are many people have difficulties with Hello World…
Hi,
I am trying to create my first android app, the classic hello world. I’m fairly sure I’ve followed all directions as listed but am seeing the following errors after attempting to run the code:
[2011-07-13 18:43:17 - Emulator] invalid command-line parameter: Files.
[2011-07-13 18:43:17 - Emulator] Hint: use ‘@foo’ to launch a virtual device named ‘foo’.
[2011-07-13 18:43:17 - Emulator] please use -help for more information
Any guidance would be greatly appreciated.
Kyle
Hi,
I tried the hello world application.. but I am getting stuck at a particular point after I ‘Run’ it.. I have pasted below the output log..Nothing happens after the last line.. even though I keep waiting for more than an hour
Any help would be highly appreciated..
[2011-07-19 11:24:31 - HelloWorld] ——————————
[2011-07-19 11:24:31 - HelloWorld] Android Launch!
[2011-07-19 11:24:31 - HelloWorld] adb is running normally.
[2011-07-19 11:24:31 - HelloWorld] Performing com.example.helloworld.HelloWorld activity launch
[2011-07-19 11:24:31 - HelloWorld] Automatic Target Mode: launching new emulator with compatible AVD ‘Amit_avd’
[2011-07-19 11:24:31 - HelloWorld] Launching a new emulator with Virtual Device ‘Amit_avd’
[2011-07-19 11:24:41 - Emulator] Warning: No DNS servers found
[2011-07-19 11:24:41 - Emulator] emulator: emulator window was out of view and was recentred
[2011-07-19 11:24:41 - Emulator]
[2011-07-19 11:24:41 - HelloWorld] New emulator found: emulator-5554
[2011-07-19 11:24:41 - HelloWorld] Waiting for HOME (‘android.process.acore’) to be launched…
[2011-07-19 11:25:31 - HelloWorld] HOME is up on device ‘emulator-5554′
[2011-07-19 11:25:31 - HelloWorld] Uploading HelloWorld.apk onto device ‘emulator-5554′
[2011-07-19 11:25:31 - HelloWorld] Installing HelloWorld.apk…
[2011-07-19 11:26:02 - HelloWorld] Success!
[2011-07-19 11:26:02 - HelloWorld] Starting activity com.example.helloworld.HelloWorld on device emulator-5554
[2011-07-19 11:26:04 - HelloWorld] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.helloworld/.HelloWorld }
@Kyle All you need to do is reinstall the Android SDK directly in C:\ Directory(C:\Android\….) when the installation wizard asks you to specify a location. For some reason the plugin doesn’t know how to handle the space between “Program Files”. I hope that solves your problem.
C:\PROGRA~1\Android-SDK-r12 works !
hey guys /….i am getting an error in the helloworld app in this section of textview
give example of login validation throw database for android application
hey guys
i installed everything as mentioned above but when i start eclipse i get an error saying “Failed to initialize Monitor Thread: Unable to establish loopback connection”. then when I try running the hello android, it says
Android Launch!
[2009-06-28 22:55:34 - LunchList] Connection with adb was interrupted.
[2009-06-28 22:55:34 - LunchList] 0 attempts have been made to econnect.
[2009-06-28 22:55:34 - LunchList] You may want to manually restart adb from the Devices view.
Can someone help me please!!!
give me suggestion for software requirement in ANDROID development with the help of ECLIPS ..
hoe to learn ANDROID DEVELOPMENT course and which WEBSITE AND TOOL i use…
Hi,
I was trying to create my first Android app yesterday, also a Hello World program. Unfortunately, I am getting some errors when I try to build the project.the bellow msg was apper.what can i do sir.
[2011-12-19 10:22:19 - AndroinHelloWorld] Android Launch!
[2011-12-19 10:22:19 - AndroinHelloWorld] adb is running normally.
[2011-12-19 10:22:19 - AndroinHelloWorld] Performing com.example.AndroidHelloWorld.AndroinHelloWorld activity launch
[2011-12-19 10:22:19 - AndroinHelloWorld] Automatic Target Mode: launching new emulator with compatible AVD ‘My_avd’
[2011-12-19 10:22:19 - AndroinHelloWorld] Launching a new emulator with Virtual Device ‘My_avd’
[2011-12-19 10:22:27 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2011-12-19 10:22:27 - Emulator] emulator: emulator window was out of view and was recentered
[2011-12-19 10:22:27 - Emulator]
[2011-12-19 10:22:27 - AndroinHelloWorld] New emulator found: emulator-5554
[2011-12-19 10:22:27 - AndroinHelloWorld] Waiting for HOME (‘android.process.acore’) to be launched…
[2011-12-19 10:22:59 - AndroinHelloWorld] HOME is up on device ‘emulator-5554′
[2011-12-19 10:22:59 - AndroinHelloWorld] Uploading AndroinHelloWorld.apk onto device ‘emulator-5554′
[2011-12-19 10:22:59 - AndroinHelloWorld] Installing AndroinHelloWorld.apk…
am the begginer for android.ur explanation is nice and easily understandable.i was make the hello world program with the help of your site. there is no error but the required output will not come.plz help me sir.only blank emulator will be appeared when i was run this program.
Balaji J on December 19th, 2011 5:09 am
Very informative and clear tutorial. It works file. If you’re getting error. My advice is to do it step by step.
I have setup it, but cant’
i want to setup, help me!
hi,when i try to make a new android project,after pressing the finish button i receive an error:the file did not find
what should i do? please help me
thanks
plz can u suggest me how to generate the lyrics of songs in Android music players…plz recognize me and give me the solution its urgent..
Very frustrated with the difficulty in getting a Hello World sample to run. This page is out of date as the ADT download no longer works. Another waste of time in the world’s record of sloppy attempts to supply developers with something that works.
hii
i tried the program
well when i run the program on the output i just seee a black screen
and no display of my text
Nice tutorial, thanks a billion!