Kotlin 1.2.50 causing java.lang.IllegalStateException ScriptingCompilerConfigurationComponentRegistrar is not compatible with this version of compiler


#21

I have the same issue. Tried everything mentioned above but its still there.

  1. Upgraded Intellij kotlin plugin to 1.2.51.
  2. Upgraded sdkman kotlin version to 1.2.51. (or deleted it then it reports kotlin home invalid)
  3. Tried wrapper version 4.7 or 4.8, but neither worked

it failed in both command line and intellij. What else can i try?


Update: I finally got it working after disabling sdkman (comment out its script in my bash profile) to remove the KOTLIN_HOME. After that, it picks up Intellij installed kotlin. So for me it is also a kotlin version conflicts between sdkman and intellij, though all are 1.2.51 they seem to be different version and incompatible.


#22

Curiously the IllegalStateException problem only occurs when using Gradle via the terminal. If Gradle is used via IntelliJ then the problem doesn’t occur. The only constant in this thread is that downgrading Kotlin to 1.2.41 fixes the problem, however it is a temporary workaround which isn’t feasible for all Kotlin projects.


#23

Apparently the same issue: https://github.com/JetBrains/kotlin-workshop/issues/12

And kotlin issue: https://youtrack.jetbrains.com/issue/KT-24438
marked as fixed but people are still reporting it.


#24

I might be late to the discussion, but still:

That happened to me after using Spring Initializr, as it used Kotlin version 1.2.51 - I updated both the IntelliJ IDE plugin and the version in my gradle file to 1.2.70, and now the error is gone.


#25

I had to restart my computer to make it work.