Android Hello world example using Android Studio

In previous post, we have setup android studio and SDK. In this post, we will create Android hello world app.
Once you are done with Android studio download and installation, you will see below screen.

Start new Android project

Click on “Start a new Android studio project”. You will see below screen.

Create New Android Project

Application Name : You need to provide name of application.
Company Domain : If you have your domain, you can put it here.
Package name : Package name should be unique. When you publish your application with google play store, google play store distinguishes your app by package name only.

Click on Next after filling above form.

Choose Phone and tablet

Choose “Phone and Tablet” and select Minimum SDK, you want to support for your application.
Click on Next and you will see below screen:

Choose Android Activity

It is activity selection screen. We will choose “Empty Activity”. It should be good enough for our hello world project.
Click on Next.

Customize Activity

Activity Name : It is name of Activity , you want to create. I have put it as “HelloWorldActivity”.
Layout Name : When Android studio create activity for you, it also create layout xml file which binds with the activity.
Don’t worry , if you do not understand about it much, I will write separate post to explain Activity.
Click on Finish. You will get below screen.

Created Android Hello world

Run Hello World App :

Lets run the app now.
Go to Run – > Run ‘app’ , you will see below screen.

Select AVD screen

We are going to create Android Virtual Device to demonstrate create android app.
Click on “Create New Virtual Device” , you will see below screen.

Choose Android Hardware

Choose suitable android configuration on which you are going to test your application. Click on next.

Download System Image

Here we are going to select System image, you may not have downloaded system image, so you can download by clicking on link.
When you click on download, you will see below screen.

Download Android Virtual Device

It will download system image, once done click on Finish. You will see below screen.

Android Virtual Device

You can provide name to your AVD. Click on Finish.

Nexus 5 API 25

Choose downloaded AVD and click on Ok.
You will see an additional app started.

Android Hello World Screen

Bingo!! we have successfully create Hello world Android App. Don’t worry if you do not understand much yet, I will explain about Activity and Android folder structure which will help you to understand created android app.

Was this post helpful?

Related Posts

  • Check if Variable is null in PowerShell
    04 January

    PowerShell – Check If Variable Is Null

    Table of ContentsUsing $null VariableUsing Conditional StatementUsing IsNullorEmpty() MethodUsing IsNullOrWhiteSpace() MethodUsing Null-Coalescing Operators Using $null Variable Use the $null variable with the -eq parameter to check whether a variable is equal to $null. [crayon-63b5cb447cccb807886702/] [crayon-63b5cb447ccd1659071400/] The above code returned a Boolean value True which means a variable is equal to null. What is null? null […]

  • PowerShell get filename for Path
    03 January

    PowerShell – Get Filename from Path

    Table of ContentsPowerShell – Get Filename From Specified PathUsing Split-Path CmdletUsing Get-Item CmdletUsing Get-ChildItem CmdletUsing GetFileName() MethodGetting Multiple File NamesWith ExtensionsWithout Extension PowerShell – Get Filename From Specified Path The location of a file on a system can be determined by its path. In PowerShell, there are several ways to get filename from path. Firstly, […]

  • Count files in folder in PowerShell
    01 January

    PowerShell – Count Files in Folders

    Table of ContentsCount Files in Folders in PowerShellCount Files in multiple Folders in PowerShellCount Files in Folders and Subfolders in PowerShellCount only folders inside folder in PowerShellCount Files by Extension in Folder in PowerShell Count Files in Folders in PowerShell We can use the Measure-Object cmdlet in different ways to meet our project requirements. However, […]

  • Check if Object contains property in PowerShell
    31 December

    Check if Object has Property in PowerShell

    Table of ContentsUsing the -match ParameterUsing -contains ParameterUsing if-else BlockUsing .Match() Function with if-else BlockUsing Get-Member Cmdlet Using the -match Parameter Use the -match parameter to check if an object has a property in PowerShell. [crayon-63b5cb447d549281392270/] [crayon-63b5cb447d54d263700145/] Here, we used the -match parameter to check if the given object, which is $result in our case, […]

  • Create Empty File in PowerShell
    28 December

    Create Empty File in PowerShell

    Table of ContentsUsing New-Item CmdletUse the ni AliasUsing Out-File CmdletUsing the fsutil file CommandUsing Text EditorUsing echo CommandUsing for Loop Using New-Item Cmdlet Use the New-Item cmdlet to create an empty .txt file in PowerShell. [crayon-63b5cb447d6e7925467268/] [crayon-63b5cb447d6ea769038527/] We used the New-Item cmdlet with -Path, -Name, and -ItemType parameters to create an empty .txt file using […]

  • 27 December

    Run PowerShell as Another User

    Table of ContentsUsing the runas CommandOpen the PowerShell as an AdministratorRun the runas commandUsing the Start-Process cmdlet with the Credential ParameterUI-Based SolutionScript-Based Solution Using the runas Command The runas command in PowerShell launches programs using credentials different from the current user. It provides users with limited privileges to execute commands or access resources available only […]


Leave a Reply

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

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.