Cannot run sandbox (runIde)

Since moving to 2025.1 I can’t find a way to run the sandbox. I’m getting lots of errors like these:

e: file:///Users/eliorboukhobza/projects/material-theme-jetbrains/src/main/java/com/mallowigi/idea/MTAnalytics.kt:57:5 Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.1.0, but the compiler version 1.9.0 can read versions up to 2.0.0.
The class is loaded from /Users/eliorboukhobza/.gradle/caches/transforms-3/3cecb21d7763d65dd9327f20f332542f/transformed/ideaIU-LATEST-EAP-SNAPSHOT/lib/util-8.jar!/kotlin/Unit.class

Can someone help? I tried clearing the caches, removing the build directory multiple times, no success.

Thanks for highlighting that! Please note:

The actual metadata version is 2.1.0, but the compiler version 1.9.0 can read versions up to 2.0.0.

Since 251, the IntelliJ Platform requires to use Kotlin in version 2+.
Yesterday, I’ve introduced a relevant check in the IntelliJ Platform Gradle Plugin to wart you about that in a more friendly way:

To get the 251 working, please bump the Koltin Gradle Plugin (org.jetbrains.kotlin.jvm version to the latest available: 2.1.10.

Thanks, now it works but I get a new error:

e: org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR fake override builder
File being compiled: /Users/eliorboukhobza/projects/material-theme-jetbrains/src/main/java/com/mallowigi/idea/ui/MTButtonUI.kt
The root cause java.lang.OutOfMemoryError was thrown at: unknown
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:253)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:236)
	at org.jetbrains.kotlin.fir.pipeline.Fir2IrPipeline.buildForAll(convertToIr.kt:377)
	at org.jetbrains.kotlin.fir.pipeline.Fir2IrPipeline.buildFakeOverrides(convertToIr.kt:308)
	at org.jetbrains.kotlin.fir.pipeline.Fir2IrPipeline.buildFakeOverridesAndPlatformSpecificDeclarations(convertToIr.kt:297)
	at org.jetbrains.kotlin.fir.pipeline.Fir2IrPipeline.runActualizationPipeline(convertToIr.kt:210)
	at org.jetbrains.kotlin.fir.pipeline.Fir2IrPipeline.convertToIrAndActualize(convertToIr.kt:130)
	at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.convertToIrAndActualize(convertToIr.kt:100)

I tried adding the kotlin.daemon.jvmargs=-Xmx4096 but to no success

Ok after cleaning and restarting the IDE I managed to make it work.

/thread