Kotlin unresolved reference in IntelliJ

后端 未结 20 1453
太阳男子
太阳男子 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:26

    If anyone stumbles across this and NEITHER Invalidate Cache or Update Kotlin's Version work:

    1) First, make sure you can build it from outside the IDE. If you're using gradle, for instance:

    gradle clean build
    

    If everything goes well , then your environment is all good to work with Kotlin.

    2) To fix the IDE build, try the following:

    Project Structure -> {Select Module} -> Kotlin -> FIX

    As suggested by a JetBrain's member here: https://discuss.kotlinlang.org/t/intellij-kotlin-project-screw-up/597

提交回复
热议问题