Kotlin Android Hello World

In this tutorial you will learn about the Kotlin Android Hello World and its application with practical example.

As we know that Google has announced that Kotlin is official language for android. It has briefly discussed in introduction article of Kotlin with Android. Let’s make our first “Hello World” Project with Kotlin. Please Update your Android Studio before start coding with Kotlin.
Create An Android Application With Kotlin:
For creation of new project with Kotlin Let’s Open your Android Studio and click on New Project. You will get screen like below image.

Table Of Contents

hello-world-1

Enter Application Name and company domain, Do not forget to check “Include Kotlin support”. Click on Next button, You will get new screen like below image.

hello-world-2

#Select your minimum sdk version and click on “Next”, You will get new screen like below image.

hello-world-3

# Again Click on Next Button and then finish it like below image.

hello-world-4

#So Below is your Android Activity with Kotlin. The Extension is with “.kt” .

hello-world-5

Declare Activity: Below is the code for declaration of an Activity in both language Java and Kotlin.

Declare Activity in Kotlin:

Declare Activity in Java:

So this was the way that how you declare Activity in both Language.

#XML: Default Xml when you first time create any project will look like below image.

hello-world-6

Run: You are all set with your “Hello World” project, just click on Run button and output will display like below image.

hello-world-7

So this was simple project of Android With Kotlin, Hopefully It will clear your basic with Kotlin.

 

In this tutorial we have learn about the Kotlin Android Hello World and its application with practical example. I hope you will like this tutorial.