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

I using
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
I had the same problem, the @y.bedrov's suggestion helps me.
The issue is that the Classpath is empty (under Project Structure -> Platform Settings -> SDKs -> <choose active SDK> -> Classpath)
To fix this, you can recreate the SDK:
Project Structure -> Platform SDKs -> <choose active SDK> -> "-"Project Structure -> Platform SDKs -> "+" -> <choose target SDK location>This was definitely some IntelliJ peoblem for me. I could solve the issue by stupidly deleting the "problematic" class and creating it again:
What generally people also suggest when having similar problem (but didn't help in my case):
Kotlin Compiler and Java Compiler match in versions.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With