Site icon DataFlair

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

FREE Online Courses: Your Passport to Excellence - Start 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.

 

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:

Technology is evolving rapidly!
Stay updated with DataFlair on WhatsApp!!

2. Click on the file menu:

3. Click on the New button:

4. Now, click on import project:

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

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

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:

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

Exit mobile version