简体   繁体   中英

Configure Kotlin to an existing project in IntelliJ

I created a kotlin new Kotlin project through intelliJ ( https://github.com/dhananjay12/kotlin/tree/master/kotlin-basic ) a while back. I then imported it into IntelliJ from a different machine.

There is no run option coming : 在此处输入图片说明

I tried to configure using Project SDK and Libraries, still, IntelliJ doesn't recognize it as a kotlin project. 在此处输入图片说明

在此处输入图片说明

NOTE- New project works completely fine

How do I configure an existing project to Kotlin?

What files need to be saved in git so that manually configuring IDE is not required?

1) Right click the src folder

2) Mark directory as Sources Root

3) Will ask you to configure Java SDK and Kotlin Plugin for the module. Do it.

4) Run & enjoy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM