https://kotlinlang.org logo
#serialization
Title
# serialization
e

eric

01/31/2018, 8:18 PM
I'm trying to use the serialization library, but I'm getting the following when building with Gradle:
Error:Kotlin: [Internal Error] java.lang.IllegalStateException: The provided plugin org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationComponentRegistrar is not compatible with this version of compiler
... My IDE uses the latest stable Kotlin plugin (1.2.21-release-IJ2017.3-1). I have included the serialization plugin in my buildscript dependencies (`classpath 'org.jetbrains.kotlinxkotlinx gradle serialization plugin0.4'). Is there something I haven't configured correctly for the plugin?
s

sandwwraith

01/31/2018, 8:57 PM
Check kotlin version in your
build.gradle
- it may be different
e

eric

01/31/2018, 9:09 PM
hm, it's 1.2.21 as well.
Copy code
buildscript {
  repositories {
    mavenCentral()
    maven { url '<https://kotlin.bintray.com/kotlinx>' }
  }
  dependencies {
    classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.21'
    classpath 'org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:0.4'
  }
}
s

sandwwraith

02/06/2018, 9:01 AM
Does it work with 1.2.20?
e

eric

02/06/2018, 7:30 PM
no, same error, unfortunately.
the cause, if it helps:
Copy code
Caused by: java.lang.AbstractMethodError: org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationComponentRegistrar.registerProjectComponents(Lcom/intellij/mock/MockProject;Lorg/jetbrains/kotlin/config/CompilerConfiguration;)V
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:176)
(also tried disabling the Kotlin Plugin, restarting, re-enabling. no dice. haha, i guess my IJ installation is goofed?)
s

sandwwraith

02/07/2018, 4:07 PM
Seems rather strange. Gradle build errors are not really connected with IntelliJ. Which version of gradle do you use?
e

eric

02/07/2018, 8:57 PM
4.4
just tried with 4.5, but i'm getting the same error.
14 Views