Kotlin unresolved reference in IntelliJ

后端 未结 20 1428
太阳男子
太阳男子 2020-12-01 08:47

I started off with the tutorial for learning Kotlin in IntelliJ.When I tried running the example i.e

fun main(args: Array) {
 prin         


        
20条回答
  •  旧巷少年郎
    2020-12-01 09:32

    For me, it was due to the project missing Gradle Libraries in its project structure.

    Just add in build.gradle: apply plugin: 'idea'

    And then run: $ gradle idea

    After that gradle rebuilds dependencies libraries and the references are recognized!

提交回复
热议问题