I am getting `Engine exception: Kotlin reflection ...
# kotest
I am getting
Engine exception: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
when running kotest tests from Android Studio with the help of kotest idea plugin. The same running from command line using gradle works just fine.
Is the kotlin-reflect jar added to your dependencies ?
Initially it wasn’t (but I believe it could have been added transitively by some other libs. But I tried also adding
Copy code
and that didn’t help. Also there is no problem running the test from command line using
I wonder if there might be a problem with idea plugin, looks like it doesn’t pick everything it should.
Adding kotlin-reflect.jar manually to the classpath (in the kotest configuration dialog) allows to run the test which then fails at a later stage with
kotlinx.coroutines.internal.ThreadSafeHeapNode kotlinx.coroutines.internal.ThreadSafeHeap.find(kotlin.jvm.functions.Function1)'
But that should already be on the classpath as that is all already set in build.gradle.kts