Android Hello World + eclipse + JAVA
November 9, 2010 Leave a Comment
Downloads
Download Plugin for eclipse..
https://dl-ssl.google.com/android/eclipse/
Download sdk for android
http://developer.android.com/sdk/index.html
Setup and Running Android
Install the required packages – Windows – Preferences – Android
Select SDK location
Install the API and android packages
Create android project
Select the virtual device
Sample code – HelloWorld
package com.android.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText(“Hello, Android”);
setContentView(tv);
}
}
Launch the Android Application
Output








