Unresolved reference on everything


I created a kotlin project and it was working fine.

But now it’s throwing an error on everyhing(Int, Array, println…)

I tried removing the kotlin module and recofnigure it and it didn’t work.

Strange thing is that when I do “Invalidate Caches/Restart” from the File menu,

the content of the project disappears.

I created my project as
New Project -> Java -> Kotlin/JVM

And now I created a file and the error is thrown right away.


Have you tried closing the project, deleting .idea directory and test.iml file and then using File->New->Project from Existing Sources... (or Import project... on project selection screen if you do not have any project opened)?