Missing kotlin SDK
Answered
I accidentally removed Kotlin SDK instead of old java JDK. SDK compiler now throws errors (not surprisingly). The issue is, I cant seem to find a way to add the Kotlin SDK back. I can add only JDK, Android and Python SDKs, but not Kotlin SDK. Also, tried reinstalling the Kotlin plugin, but that is not possible as it is bundled and cant be removed. Is there a way how to put the SDK back?
Please sign in to leave a comment.
If your project is Gradle or Maven based, it should help to just re-import the project: https://stackoverflow.com/a/43192764/104891.
Otherwise, right click on the project name in the project view and Add Framework support:
See also https://www.jetbrains.com/help/idea/adding-support-for-frameworks-and-technologies.html ,
I dont have Kotlin in the list of available frameworks while I have the Kotlin plugin installed and reimport didnt help.
What partially helped was creating new Kotlin project. Now i see that I have Kotlin SDK back in my platform SDKs.
But Kotlin compilation still fails.
Does it help to kill all JVM / Kotlin processes / daemons and do a clean build? https://youtrack.jetbrains.com/issue/KT-31602#focus=Comments-27-5660382.0-0