I’m very new to Kotlin, and I’m having a hell of a time getting the latest plugin 1.2.30-release-IJ2017.3-1 to work correctly in IntelliJ Communitiy edition.
The plugin immediately throws an error. First few lines of the stack trace in the error details:
null
java.lang.AbstractMethodError
at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generateSyntheticPartsAfterBody(ImplementationBodyCodegen.java:389)
at org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:145)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:316)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:300)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:326)
Building and running my project works fine, it’s just that the IDE plugin doesn’t do all the fancy auto-formatting, error detection, etc.
I’ve updated my Gradle Build file to match the runtime, I’ve tried downgrading to 1.2.21, though that was catastrophic (nothing worked anymore…), I’ve uninstalled and reinstalled the plugin a million times.
Part of the problem though is that I don’t know what the core problem is. Any direction would be super helpful. Thanks.
Running the latest kotlin plugin (1.2.30) and getting the same error as reported above.
null
java.lang.AbstractMethodError
at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generateSyntheticPartsAfterBody(ImplementationBodyCodegen.java:389)
at org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:145)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:316)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:300)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateClassOrObject(PackageCodegenImpl.java:157)
at org.jetbrains.kotlin.asJava.builder.LightClassDataProviderForClassOrObject$computeLightClassData$1$1.invoke(LightClassDataProvider.kt:53)
at org.jetbrains.kotlin.asJava.builder.LightClassDataProviderForClassOrObject$computeLightClassData$1$1.invoke(LightClassDataProvider.kt:39)
at org.jetbrains.kotlin.asJava.builder.LightClassBuilderKt.buildLightClass(LightClassBuilder.kt:60)
at org.jetbrains.kotlin.asJava.builder.LightClassDataProviderForClassOrObject$computeLightClassData$1.invoke(LightClassDataProvider.kt:48)
at org.jetbrains.kotlin.asJava.builder.LightClassDataProviderForClassOrObject$computeLightClassData$1.invoke(LightClassDataProvider.kt:39)
at org.jetbrains.kotlin.idea.caches.resolve.lightClasses.LazyLightClassDataHolder$lazyInexactStub$2.invoke(LazyLightClassDataHolder.kt:52)
at org.jetbrains.kotlin.idea.caches.resolve.lightClasses.LazyLightClassDataHolder$lazyInexactStub$2.invoke(LazyLightClassDataHolder.kt:33)
at kotlin.SafePublicationLazyImpl.getValue(Lazy.kt:194)
Thanks @suresh
I do have kotlinx-serialization, but I can’t disable it as I’m working within a codebase that depends on it.
Good to know that that is the problem. I’ll go bug that team on their forums to fix their plugin.
In the meantime, if anyone has this issue and can’t disable kotlinx-serialization like me, I’ve downgraded to plugin version 1.2.10 by “Uninstalling” the Kotlin plugin. This seems to not fully uninstall, it simply uninstalls plugin updates. I’ve kept my compiler / runtime at 1.2.30 and am able to get working again.