Hey guys, I have a problem using kotlin-reflect wi...
# reflect
f
Hey guys, I have a problem using kotlin-reflect with r8 shrinker. I have tried investigating it but could not find the root cause any help would be appreciated. Please see 🧵 for more 🙂
Copy code
Runtime Exception (Stripped confidential parts):


Function 'foo' (JVM signature: foo(Ljava/lang/String;Lokhttp3/RequestBody;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;) not resolved in class someApplicationPackage.AwsRetrofitApiService: @ApplicationAnnotation @p.a0.k @p.a0.p public abstract suspend fun foo(@p.a0.y signedUrl: kotlin.String, @p.a0.a file: m.e0): p.t<BaseResponse<kotlin.Any>> defined in someApplicationPackage.AwsRetrofitApiServiceV | foo(Ljava/lang/String;Lm/e0;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
So we have a kotlin interface that has methods that are annotated with application annotations. We check this annotation at runtime and run some business logic. But somehow proguard seems to be stripping some metadata or modifying its signature.
Here is the stacktrace:
Copy code
kotlin.reflect.jvm.internal.KDeclarationContainerImpl.findFunctionDescriptor (KDeclarationContainerImpl.java:132)
kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke (KFunctionImpl.java:56)
kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke (KFunctionImpl.java:36)
kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke (ReflectProperties.java:92)
kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue (ReflectProperties.java:31)
kotlin.reflect.jvm.internal.KFunctionImpl.getDescriptor (KFunctionImpl.java:7)
kotlin.reflect.jvm.internal.KFunctionImpl.getDescriptor (KFunctionImpl.java:36)
kotlin.reflect.jvm.internal.KCallableImpl$_annotations$1.invoke (KCallableImpl.java:36)
kotlin.reflect.jvm.internal.KCallableImpl$_annotations$1.invoke (KCallableImpl.java:23)
kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke (ReflectProperties.java:92)
kotlin.reflect.jvm.internal.KCallableImpl.getAnnotations (KCallableImpl.java:38)
kotlin.jvm.internal.CallableReference.getAnnotations (CallableReference.java:150)
.KotlinExtensionsKt.findAnnotation (KotlinExtensionsKt.java:540)