#Converting to Kotlin, met with error

12 messages · Page 1 of 1 (latest)

urban ledge
#

I'm working on a Java project and within this project I did my first try with Kotlin. I converted one class to Kotlin. However, upon running some code from that class it crashes and I get met with the following error: Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
Here is my build.gradle.kts file: https://pastebin.com/Npn43iYg
Thanks!

tropic lavaBOT
#

This post has been reserved for your question.

Hey @urban ledge! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

zealous nexus
#

if you are using Kotlin, you need the Kotlin stdlib

urban ledge
#

But I already have it don't I?

#

implementation(kotlin("stdlib-jdk8"))

zealous nexus
#

Oh so it is a Minecraft plugin?

#

Make sure that the Kotlin stdlib is also included when running Minecraft

urban ledge
#

Could you clarify what you mean?
Apparently I need to shade it: https://www.spigotmc.org/threads/java-lang-noclassdeffounderror-kotlin-jvm-internal-intrinsics.333120/
However, I'm not quire sure how to do it with gradle, here's my code: https://pastebin.com/Npn43iYg
I'd appreciate any help!

zealous nexus
urban ledge
#

Thanks, I'll look into it.

tropic lavaBOT
# urban ledge Thanks, I'll look into it.

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.