Want to move to 1.5, but lots of "compiled by prerelease" errors

I’d like to start using 1.5. Maven.


But I get a ton of
Class 'kotlin.Unit' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler

Without any compile args, I get
Kotlin: Pre-release classes were found in dependencies. Remove them from the classpath, recompile with a release compiler or use '-Xskip-prerelease-check' to suppress errors

The problem is that Idea 2021.1 still does not have Kotlin 1.5 plugin. The compilation itself goes fine (at least in Gradle). I think you should just ignore those errors for now, roll back idea if they do bother you and enable this ‘-Xskip-prerelease-check’ if maven does not allow to compile without it.

One can always download the prerelease version of the Kotlin plugin. The documentation on how to do so is found here: Install the EAP Plugin for IntelliJ IDEA or Android Studio | Kotlin

There is no EAP 1.5 version for IDEA 2021.1. So for now downgrading the idea itself is the only solution. But I think the 1.5 plugin will come soon.

1 Like

Well, I’m using 2021.1 with 1.5. I do recall getting the errors reported above, but I got rid of them by going into settings, kotlin, update channel and selecting 1.5.

This is all working fine now.