kotlin.reflect.jvm.internal.KotlinReflectionInternalError: Introspecting local functions, lambdas, anonymous functions and local variables is not yet fully supported in Kotlin reflection코 틀린/안드로이드 - 람다
이 예외와 데이터 클래스에 KotlinReflectionInternalError는 데이터 클래스의 toString()
에서 온다.
데이터 클래스에는 람다가 포함되어 있습니다.
내 환경에서는 재생산 할 수 없습니다.
람다를 제외하려면 toString()
을 무시해야합니까? 또는 람다는 데이터 클래스에서 전혀 허용되지 않습니까? 오류를 생산
data class PersistJob(
private val id: Int,
private val delay: Long = 10_000L,
private val maxDelay: Long = 60_000L,
private val iteration: Int = 0,
private val block: suspend (Int) -> Boolean) {
fun getDelay() = minOf(delay, maxDelay)
fun withDelayIncreased() = copy(
delay = minOf(delay * 2, maxDelay),
iteration = iteration + 1)
suspend fun execute() = block(iteration)
}
라인 :
val job: PersistJob = ...
log.debug("start job id($id): $job")`// job.toString()
스택 추적 :
at kotlin.reflect.jvm.internal.EmptyContainerForLocal.fail(SourceFile:41)
at kotlin.reflect.jvm.internal.EmptyContainerForLocal.getFunctions(SourceFile:37)
at kotlin.reflect.jvm.internal.KDeclarationContainerImpl.findFunctionDescriptor(SourceFile:145)
at kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke(SourceFile:54)
at kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke(SourceFile:34)
at kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke(SourceFile:93)
at kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue(SourceFile:32)
at kotlin.reflect.jvm.internal.KFunctionImpl.getDescriptor(SourceFile)
at kotlin.reflect.jvm.internal.ReflectionFactoryImpl.renderLambdaToString(SourceFile:59)
at kotlin.jvm.internal.Reflection.renderLambdaToString(SourceFile:80)
at kotlin.jvm.internal.Lambda.toString(SourceFile:22)
at java.lang.String.valueOf(String.java:2683)
at java.lang.StringBuilder.append(StringBuilder.java:129)
'내 환경에서는 재생할 수 없습니다.'- 어떻게해야합니까? – voddan
충돌 보고서를 통해 확인하세요. –