Say Hello to Android (Creating First Android App)
Home Courses Community Support
Gray Matter

First Step Towards Android: Introduction »

Understanding Activities and Intents »

Hands On With UI Designing In Android (Controls-Views,Widgets and Layouts) »

Updating... »

Say Hello to Android (Creating First Android App)

You need to follow the 3 steps to create the Hello android application.

Create the New Android project

For creating the new android project:

  1. Select File -> New -> Project
  2. Select the android project and click next

  3. Fill the all the Details in this dialog box and then click finish

Now your android project have been created. You can explore the android project and see the simple program, it looks like this:  

Write the message

To write the message we are using the TextView class. Change the onCreate method as:

TextView textview=new TextView(this);
textview.setText("Hello Android!");

Let's see the full code of file.

package com.example.helloandroid;  
import android.os.Bundle;  
import android.view.Menu;  
import android.widget.TextView;  
public class MainActivity extends Activity {  
protected void onCreate(Bundle savedInstanceState) {  
TextView textview=new TextView(this);  
textview.setText("Hello Android! How r u?");  
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.  
getMenuInflater().inflate(, menu);
return true;

Now you will see your activity_main.xml file as below-

<RelativeLayout xmlns:android=""
????tools:context=".MainActivity" >

????????android:text="@string/hello_world" />


Run the android application

To run the android application: Right click on your project > Run As.. > Android Application

The android emulator might take 2 or 3 minutes to boot. So please have patience. After booting the emulator, the eclipse plugin installs the application and launches the activity.

You will see something like this:


← Preview

Understanding Components of Application

Next →

Understanding Anatomy/ Internal Details of an Application


Our mission is to provide highly effective and quality education via innovative solutions. Geeksdemy look forward to bridge the gap between in-demand technology and academics in order to deliver innovative, easy, interesting and affordable learning across the Globe.


  • Python
  • Game Development with Unity 3D
  • Arduino
  • PCB & Circuit Designing
  • Robotics and Embedded C
  • 8051/8052 Embedded Systems
  • QuadCopter & UAV
  • MATLAB with Robotics
  • Raspberry Pi
Learn On the Go!
Get the Android App
Get the iOS App