Hi, IntelliJ IDEA shows an error when the code ref...
# announcements
i
Hi, IntelliJ IDEA shows an error when the code references `KClass`:
Copy code
Class 'kotlin.reflect.KClass' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
I'm using Kotlin 1.5.0-M1 in the latest EAP of the IDE with Kotlin plugin targeting 1.5.0 turned on, the project is built using Gradle. `KClass`seems to be referenced correctly by the IDE as coming from the 1.5.0-M1 JAR. Has anybody seen this error before?
a
I'm using Kotlin 1.5.0-M1 in the latest EAP
If by
in the latest EAP
you mean Intellij IDEA 2021.1 beta. Then it doesn't support neither Kt 1.4.30 stable nor 1.5 ATM
And I see same error 🙂
i
This is the build I just downloaded:
Copy code
Build #IU-211.6693.14, built on March 25, 2021
@audriusk thanks for your feedback
For ref.
i
Thanks!
So if I downloaded the Kotlin SDK 1.4.30 separately, it would support this?
a
No. it supports only <=1.4.20
If you want to use stable Kt, your best bet would we IJ 2020. But it doesn't support latest stable Android. If you need that too then you should try Android Studio. But not Android Studio Canary. That doesn't support stable Kt either 😄
i
For Android, I use Android Studio 😉
But "stable Kt" will not refer to 1.5.0-M1, right?
Sorry, I'm new to the Kotlin release process (although old to IntelliJ 🙂 )
a
I don't think that there is official Kotlin release process. Here you can see which Kotlin plugin version are released https://plugins.jetbrains.com/plugin/6954-kotlin/versions/staging KT. 1.5 EAP is supported only in ide:
Copy code
<https://plugins.jetbrains.com/plugin/6954-kotlin/versions/staging/112612|203-1.5.0-M1-release-247-AS6682.9>
203.6682—203.*
203.6682—203.*
i
I see, not compatible with any IntelliJ version 😄
Thanks for the link!