Kotlin unresolved reference in IntelliJ

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

    I was too getting this error, but i have solved this using below concept.

    1. Restart your intellij idea community edition.
    2. After that, go on the right hand corner to set the configuration for java.

    1. choose configuration setting for all module. then re-run the code. It will work.

    This error comes because of not configuring java properly.

    0 讨论(0)
  • 2020-12-01 09:34

    I had this problem because I was trying to set up a multiplatform library configurations.

    I had deleted all the source sets with their dependencies from the "build.gradle" file but kept the "common" source set.

    Native was working fine but the JVM was not able to build and showed your error.

    In the end, the solution was to not delete the Source set of the JVM neither it's dependencies

    0 讨论(0)
提交回复
热议问题