相关文章推荐
酷酷的茴香  ·  Jetpack ...·  4 月前    · 
含蓄的大象  ·  Mybatis升级Mybatis-plus, ...·  10 月前    · 
健壮的香烟  ·  flume系列之:使用通配符批量消费kafk ...·  1 年前    · 
面冷心慈的帽子  ·  掌握ReflectionUtils:解锁Ja ...·  2 年前    · 
胆小的签字笔  ·  玩赚AiChat——AIGC会员招募 - 知乎·  2 年前    · 
风流倜傥的松鼠  ·  预定义类型“System.*****“未定义 ...·  2 年前    · 
Code  ›  I am getting `Engine exception Kotlin reflection implementat kotlinlang #kotest
kotlin
https://slack-chats.kotlinlang.org/t/8801786/i-am-getting-engine-exception-kotlin-reflection-implementati
谦和的跑步鞋
11 月前
https://kotlinlang.org logo
Join Slack
Powered by
I am getting `Engine exception: Kotlin reflection ...
# kotest
m

Marek Kubiczek

02/05/2023, 4:13 PM
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

sam

02/05/2023, 7:03 PM
Is the kotlin-reflect jar added to your dependencies ?
m

Marek Kubiczek

02/05/2023, 7:07 PM
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

Marek Kubiczek

02/05/2023, 7:13 PM
I wonder if there might be a problem with idea plugin, looks like it doesn’t pick everything it should.

Marek Kubiczek

02/05/2023, 7:22 PM
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
344 Views
Open in Slack
Previous Next
Powered by
 
推荐文章
酷酷的茴香  ·  Jetpack Compose开源:基于Kotlin的响应式编程方案,简化UI开发 - InfoQ
4 月前
含蓄的大象  ·  Mybatis升级Mybatis-plus,解决jar冲突问题_ruoyi 使用mybatisplus jar包冲突-CSDN博客
10 月前
健壮的香烟  ·  flume系列之:使用通配符批量消费kafka的Topic_kafka topic通配符-CSDN博客
1 年前
面冷心慈的帽子  ·  掌握ReflectionUtils:解锁Java反射的无限可能-51CTO.COM
2 年前
胆小的签字笔  ·  玩赚AiChat——AIGC会员招募 - 知乎
2 年前
风流倜傥的松鼠  ·  预定义类型“System.*****“未定义或未导入,且dll全部带有黄色感叹号_预定义类型system.string未定义或导入_Ronion123的博客-CSDN博客
2 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号