This is the first article I participated in beginners’ introduction

Create a Kotlin Project (IDEA version)

This article describes how to create a Kotlin project. If you use Intellij Idea or are experienced in development, you can understand it. If you don’t, you can also create your first Hello World Kotlin application.

1. Create a project
  • Go to File, go to New, go to Project

  • Select the Java option, the SDK selects the installed SDK version (jdK8 is used in this article), and the Library and Frameworks(Library) uses Kotlin/JVM

  • Once you’re done, click Next and enter the project name and file directory

  • Click Finish to Finish creating the Kotlin project. A blank Kotlin project is now created

PS: After creating the project, you can see that the project structure is very similar to a Java project

2. Create the Kotlin project file
  • Right-click the project directory SRC, select Select New, and select Kotlin Class/File

  • Enter a File name and select a File type. Double-click to select the type or type the file name and Enter to create the project file

  • Type the following code in the file:
 fun main(args: Array<String>) {
     println("hello world");
 }
Copy the code
  • Right-click the file and select Run < file name +KT> to start the program

  • Or right-click the file in the directory and choose Run < filename +KT> to start the program

  • You can see the program print results in the console

3. Congratulations on creating your first Kotlin project and running your first Hello World, Pefact.

The process is very simple, but this is the starting point as a program ape, but also I learn to write the first article, there are many pits waiting behind, come on, SAO years.