Till now, we have learnt about how to install android studio and setup SDK components. In this tutorial, we will learn about how to create android app in Kotlin. We will go through these processes step by step.
Getting Started
Below are the steps to create android application.
-
Open Android Studio. You will see screen as below –
- To create new project, click on Start a new Android Studio project. Then, go to step 2.
- To open an existing project, click on Open an existing Android Studio project and skip remaining steps.
- If Android Studio is already opened, you can create new project by clicking New Project menu shown at top-left section in Android Studio. Check attached image –
Then, go to step 2.
-
Clicking on Start a new Android Studio project or File => New => New Project will navigate you to below screen –
Here, we need to choose template for our project. Since we are going to create project for Phone And Tablet, we select Phone And Tablet tab. There are so many types of Activity shown in window. Select any one of your choice. We have chosen Empty Activity for simplicity of this post. Click on Next button.
- Clicking on Next button redirects to final screen where you need to fill some information about your project –
There are some information you need to fill in above
- Name: Enter name of your project. Here, we have entered HelloWorld
- Package name: You may have noticed package name is being updated as you type name of the project. However, you can also choose some random, but unique, package name of the project. These is only one restriction. There must not be any android app in playstore with your chosen package name. Otherwise, you won’t be able to publish it in playstore.
- Save location: Choose the folder location in your laptop where you wish to save your application.
- Language: Click on language option dropdown. You will see Java , Kotlin options there. Since we are going to code in Kotlin, we have selected Kotlin.
- Minimum SDK: Select Minimum SDK upto which you want your application to be support. Think about who is your target audience. Who is going to install this application. If you think most of your target audience use android device having OS version greater than or equal to Lollipop, you can select Minimum SDK as 21. This field totally depends upon your target audience.
Once you have entered everything click on Finish button.
-
Congratulation! Your first Android application would look like below –
Thus, we went through tutorial on how to create android app in kotlin step by step. Similarly, you can create any android project in android studio.
What Next?
In next post, we will learn about folder structure in android project.
You must be logged in to post a comment.