Wednesday, June 13, 2012

How Do I Create My First Hello world Android Application and Run at AVD


Summarized steps to create and run heloworld application
  1. Install Android SDK
  2. Install ADT Eclipse plugin
  3. Create an Android Virtual Device (AVD)
  4. Create Android Project with Eclipse (Wizard)
  5. Code it…
  6. Start it in Android Virtual Device (AVD)
Hello World



package pkg;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloWorld 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");
                    setContentView(text);
       }
}

Run it as android application and press Home button, the HelloWorld Project will be Successfully installed on ADV.




No comments:

Post a Comment