Kotlin: Unresolved reference: java

SL5net :

I surprised, because i was able to checkout and run a Kotlin project from Github without this error, and now get get this Java-Error

Unresolved reference: java

I using

  • kotlinc-jvm 1.3.60 (JRE 11.0.4+10-b520.11),
  • IDEA 2019.3,
  • Kernel: 5.3.15-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 Desktop: Xfce 4.14.1 Distro: Manjaro Linux

i tried hit Alt+Enter. IDE manual says: "Alt+Enter: Show intention actions and quick-fixes."

This is my File-Name:

/home/me/IdeaProjects/KeyEvent-Reader-Demo/src/Test.kt

Same Error i found here: https://discuss.kotlinlang.org/t/kotlin-unresolved-reference-java/6734

PavelPraulov :

I had the same problem, the @y.bedrov's suggestion helps me, again:

  1. Project Structure -> Platform SDKs -> <choose active SDK> -> "-"
  2. Project Structure -> Platform SDKs -> "+" -> <choose target SDK location>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=359289&siteId=1