In this tutorial, we will see our first Android Hello World application.

Technologies :

  • Android 6.0 (Marshmallow)
  • Android SDK 27
  • Android Studio 3.0.1
  • Gradle

Android Hello World :

Open Android studio and create Android Hello World project. Give project name, project location and click on next.

Recommended: How install Android Studio on Windows 10 Operating System.

Android Hello World Example

Select Android API version, I am working on Android 6.0 (Marshmallow) and click on Next.

Android Hello World Example 2

Select an Empty Activity, Hello World message will appear on this activity.

Android Hello World Example 4

Give name to selected activity, as this is a main activity, I am giving the name as MainActivity and click on Finish.

Android Hello World Example 5

Now It will create our first Android Hello World project like below structure.

Project Structure :

Android Hello World Example Project

Project Overview:

Manifest: The is the Most Important File in Android as it contains all the Information about the app. It will act as a bridge between the application developer and android system.

Java: It contains all the .java files and classes where you actually code the backend of your app.

Res: This is the folder where it is mainly focused on front end and UI of the app

  1. Drawable: This  folder holds images used for the app
  2. Layout: This folder contains layout of the screen.
  3. Values: Colors contains the Hex values of colors used in app.
  4. Strings: It holds strings and app name
  5. Styles: It contains style components of the app.

Gradle Scripts: It provides the components and libraries required for app


import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {


<?xml version="1.0" encoding="utf-8"?>
< xmlns:android=""

        android:text="Hello World!"
        app:layout_constraintTop_toTopOf="parent" />


Run Application :

We can run the Android applications in 2 different modes.

  • Running on Android Emulator and
  • Running on Actual Device

Running on Android Emulator :

Emulator is nothing an Android phone used for debugging and testing android apps. It’s more like an console where you see an output.

To run the application under Emulator mode, first we should configure the emulator.

Click on Run Button which you can see on Top Right of Toolbar, then Deployment Target wizard will open like below.

Create New Virtual Device :

Android Hello World Example 8

Select any mobile, prefer selecting an 5.5 phone and then click on next.

Android Hello World Select Device

Now you need to download the androd system image for your emulator, so recommended is select Nougat or Marshmallow  the download will be started.(it may take some time)

Android Hello World Download Emulator

Click on Finish.

Android Hello world Example 10

Now select the downloaded version of system image and click next.

Android Hello World Example 11

Click on Finish to create a new virtual Device

Android Hello World Example 12

Now when you click on Run again, you can find your newly created Virtual Device.

Select the Device and click OK.

Android Hello World Example 13

Emulator may take some time to load and after successful gradle build you will see the output like this

Android Hello World Example

Happy Learning 🙂