Pages

Chapter 2: Your Very First - "Hello World" App

The "Hello World" App

Hello World App

In this chapter, we will be learning how to create your very first Android app, so we will be displaying, a message - "Hello World".

Some of the initial steps will be common to create Android app.To create a new project (new app) in Android Studio, follow these simple steps - in the coding part in future chapters, we recommend you to know some basics of Java programming language: Lets begin!

Small Info: Always use CamelCase for your project names. CamelCase is a word or phrase where each word starts with a capital letter. Example: CamelCase

Step 1:
  • Start a new Android Studio Project.

      




  • If you have already opened a project in a Android Studio then go to File-> New-> New Project->

Step 2:
  • Android Studio will configure and create a new project.
  • Write your Application name as HelloWorld.
  • Select your project's location etc.
Step 3:
  • Select the platform and minimum SDK, I have selected platform as Phone or Tablet and SDK as Jelly Bean API 16.

Step 4:

  • Add an Activity to your Application, I have added as Empty Activity.
Step 5:
  • Customize the Activity of your Application, Activity Name as MainActivity and Layout Name as activity_main. These name are optional, usually developers use these names.
  • After these things Android Studio will prepare your HelloWorld Application.
Step 6:
  • Just follow the screenshots below.






  • Run your Application with AVD (Android Virtual Device) known as emulator. 




Output:
In the output you can see the "Hello World" printed text.


Thank you!!!
Please like and share...

Unknown

Author: Nouman Baig

Editor: Mohammad Jabir

No comments:

Post a Comment