Train with a trainee: Hello World App And Emulator Set Up:
First and foremost, and I can’t stress this enough, I am not a developer. I want to be though and that’s what counts. If any of the information provided in this 12 week series is incorrect or can be made simpler, please let me know.
This is the second installment of the course. All instructions assume you have done all the previous set up work from the last post. Again follow @AndroidSPIN and @openandroidmove on twitter for when a new series is up for you to view and learn from. You can also find the whole series HERE in our Forums and will be updated with each step written.
Introduction to Android and Java.
(1) Installing Android – Completed
(2) Creating Hello World –
(3) Running on Emulator -
(4) Introduction to Java Data types, Loops, Conditionals and Operators
Now that you have all your Android software and eclipse software set up, we will move to the second part of the training class which deals with the infamous (2) Hello World application and how to set up and use the (3) Emulator. All of this is pretty simple, enjoy the easy stuff. It gets much trickier soon.
Open Eclipse and select FILE > NEW> PROJECT> Android> Android Project

Fill in the blank fields with the following:
- Project name: Hello World
- Build Target: Android 2.1 update 1 (this was my choice as I have a Samsung Vibrant and this is my OS)
- Application Name: Hello World
- Package Name: com.test.hello
- Create Activity: Hello
- Min SDK Version: 5
Once all those fields are filled in you can select finished. This will create a Hello World Application for you inside Eclipse. It will look like this

If you select the Hello World folder on the Left, then src file, then your com.test.hello, then Hello.java file you will be able to see the code used to create this application.

With this example there is no coding required on our part. It is all set up and complete.
From here we can go to the top of Eclipse and select RUN > RUN AS> Android Application. This will launch the app in the Emulator. Of course this won’t happen immediately because we haven’t set up the emulator yet. It will prompt you to do this. If for some reason it doesn’t prompt you to set up the Android Virtual Device (AVD) then simply select WINDOW> Android SDK and AVD.

- Under name: Androidtest (you can name it anything you want.)
- Target: Android 2.1-update1 – API Level 7 (that is the same build target we selected to build the app with).
- SD Card: 500 MB
- Skin: Default
Now create the AVD. Now if you created the AVD after selecting RUN AS ANDROID APPLICATION you should see this screen

If you chose to run AVD first and not RUN the application first then you will see just a default android device. Like below.

Just close the AVD and click on the Hello World folder and then RUN> RUN AS>Android Application and it should load just fine.
So now you have made your first very easy very basic application. It is nothing special. What the purpose of this tutorial is more to get your tools set up and test that they are set up correctly. They also give you a glimps into how to use some of these tools. I hope everyone got the application up and running on the AVD.
A great Google resource can be found here http://developer.android.com/resources/tutorials/hello-world.html
Word of advice – I had my phone plugged in charging off my pc when I ran this for the first time. I also had my phone in Debug mode. So when I hit the run as android application my AVD didn’t pop up. The application actually installed and ran on my phone. Just a heads up.


![[Review] Wireless Game Controller by Gamestop](http://androidspin.com/wp-content/uploads/2013/04/883386b1-150x150.jpg)
![[Game Review] Daddy Was A Thief](http://androidspin.com/wp-content/uploads/2013/05/dad-was-a-thief-150x150.jpg)



I have three books and never can do this, cause all are very technically and boring, now in 5 minutes i had my first app. Thanks
I hear ya there. I have spent many, many hours and days trying to learn this. Im glad it was as simple as it should be. The books are great, but there is so much information that they try and do an overload and you end up getting lost. I hope you follow the full 12 weeks with me and learn as much as I hope to.
Keep this up guys!!!!
[...] Installing Android – Completed HERE (2) Creating Hello World – Completed HERE (3) Running on Emulator - Completed HERE (4) Introduction to Java, [...]
[...] Installing Android – Completed HERE (2) Creating Hello World – Completed HERE (3) Running on Emulator - Completed HERE (4) Introduction to Java, [...]
When I go to “Run As”, there is no option for “Android Application”. The only thing there is “(None Applicable)”, and it’s ghosted out. What step did I miss? If I just click on the first “Hello Wolrd” on the left and then go to Run>Run As>, there are several options and “Android Application” is one of them. If I select that, I get a box that says, “Your project contains error(s), please fix them before running your application.” I then click “OK”, and check out the problems tab on my “Hello World” window. That tab contains:
Errors (1item)
This prject cannot be built until build path errors are resolved.
I know I’m behind, but I really want to catch up. Any assistance would be appreciated.
You have to select the first one like you did, that’s the Project. You build the project, not the individual *.java file.
I also had your error but make sure you create the project wth exactly his names. “Hello World” with a space in the middle. Just delete the project from disk and recreate it.
You have to select the first one like you did, that’s the Project. You build the project, not the individual *.java file.
I also had your error but make sure you create the project wth exactly his names. “Hello World” with a space in the middle. Just delete the project from disk and recreate it.
hey got a quik problem here.. when i go to ANDROID PROJECT page it wont let me select a ‘build target’.. i typed in everything else but it wont let me select it.