I am getting `Engine exception: Kotlin reflection ...
# kotest
m
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.
s
Is the kotlin-reflect jar added to your dependencies ?
m
Initially it wasn’t (but I believe it could have been added transitively by some other libs. But I tried also adding
Copy code
testImplementation("org.jetbrains.kotlin:kotlin-reflect:1.7.21")
and that didn’t help. Also there is no problem running the test from command line using
app:test
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
251 Views