Android hello world example
In this tutorial, I am going show you how to create your very first Android Application.First of all you need to Setup Android Development Environment, visit How to setup Android Development Environment in With Eclipse, to setup your How to setup android development environment.
Create Android Project
Start Eclipse, File -> New -> Android Project and input Application name, Build Target which is your android OS platform and the Package name under properties and finish.Eclipse will create all unnecessary configuration and files to your project application.
Modify the Activity class
Find the activity class FirstAndroidAppActivity.java under src, and modify as bellow
Run as Android Application
You will see "Hello Java Srilankan Support" on the virtual device (AVD)
Read more...
In this tutorial, I am going show you how to create your very first Android Application.First of all you need to Setup Android Development Environment, visit How to setup Android Development Environment in With Eclipse, to setup your How to setup android development environment.
Create Android Project
Start Eclipse, File -> New -> Android Project and input Application name, Build Target which is your android OS platform and the Package name under properties and finish.Eclipse will create all unnecessary configuration and files to your project application.
Modify the Activity class
Find the activity class FirstAndroidAppActivity.java under src, and modify as bellow
package com.firstapp;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class FirstAndroidAppActivity 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 Java Srilankan Support");
setContentView(R.layout.main);
}
}
Run as Android Application
You will see "Hello Java Srilankan Support" on the virtual device (AVD)