Android hello world example


            In this article we will read all the steps and requirement which we need to create a simple "Hello World" android application. Before starting the programming on android we need following tool to start the coding :- 
  1. JDK 
  2. Eclipse IDE
  3. Android SDK

    After make this tools available we need the following steps to create this application
  • Install Android SDK
  • Install ADT Eclipse plugin
  • Create an Android Virtual Device (AVD)
  • Create Android Project with Eclipse (Wizard)
  • Code it…
  • Start it in Android Virtual Device (AVD)
1. Download the JDK



     Go to this This Url to download the JDK for create environment.

Hello world android tutorial

2. Install ADT Eclipse plugin

 

In Eclipse IDE, select “Help” -> Install New Software…”, and put below URL :"

https://dl-ssl.google.com/android/eclipse/
 
 

3. Create an Android Virtual Device (AVD)

 

In Eclipse, you can access the “Android Virtual Device (AVD)” in Eclipse toolbar. Click “new” to create a AVD.

 

 4. Create Android Project

 

 

 
 

5. Write the Code

package com.dheeruapps.helloworld;
 
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
 
public class BasicHelloWorld extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        TextView text = new TextView(this);
        text.setText("Hello World, Dheeruapps Android Applications");
        setContentView(text);
    }
}



6. Test on Device

 






0 comments:

Post a Comment

My Instagram