Android Hello World Program – Create Your First App in Android Studio

FREE Online Courses: Elevate Your Skills, Zero Cost Attached - Enroll Now!

Android Hello World example in Android Studio – In this tutorial, we’ll show you how to start android development with the very first android project.

As a beginner first of all you must develop the hello world application like we do while learning a new language. This project doesn’t involve any business logic rather it ensures whether our development, as well as the deployment environment, is working. This is indeed a very simple android project and you do not really need to do a lot of coding here.

 

android hello world program

This application will be a very simple project that will have only one activity that will show a message that is “Hello World”. Without any further ado let’s see what all files would be there in for the application. We’ll also tell you why these files are created and their usage. In this android project, there will be two mandatory files that are

  1. activity_main.xml: This file is used for the layout of the application. In this file, we define the component layout of user interface
  2. MainActivity.java: This MainActivity file helps us write the functional part of the application

Create Android Hello World Project

Prerequisites:

Android Studio should be installed, if it’s not ready, please install android studio

Now let us see the steps to build our first project:

First, you need to download the project code: hello world android app

Once you have downloaded the project code, you can very easily import it and run the android app. Below are the steps to import and execute hello world android app:

1. Open the Android Studio:

Open Android Studio

2. Click on the file menu:

android studio file menu

3. Click on the New button:

click new button

4. Now, click on import project:

import project

5. Choose the location of project code, which you have downloaded in previous step:

import project

6. Now, our first android project is ready, we can run it by clicking on the green run button in android studio:

run android hello world project

7. Once we run the android hello world app, it will be installed automatically on the Android Virtual Device (AVD). Now, here is the output:

android virtual device

In this manner, you can start with first android app ie hello world in android studio.

Summary

In this tutorial, we have discussed how to get started with a hello world android app, you can import the project in your android studio and run it in the android virtual device.

What Next?

Work on your first real-time android project and master the android development: Build a Simple Calculator App in Android Studio

Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google

follow dataflair on YouTube

1 Response

Leave a Reply

Your email address will not be published. Required fields are marked *