Hi, everyone I have this situation that I want to ...
# android
a
Hi, everyone I have this situation that I want to reference annotation to itself.
Copy code
@kotlin.annotation.Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.PROPERTY)
annotation class ParamType(
    val rawType: KClass<*>,
    val parameters: Array<ParamType> = [],
)
it doesn't raise any warning in ide or even the debug build, but when I want to create signedApk and shrink resource is
true
it gives me this:
Copy code
Execution failed for task ':app-marketer:minifyBetaTestReleaseWithR8'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete
---
Cause: java.lang.StackOverflowError
	at com.android.tools.r8.graph.k.hashCode(SourceFile:3)
	at com.android.tools.r8.graph.Z.a(SourceFile:23)
	at com.android.tools.r8.graph.Z.a(SourceFile:24)
	at com.android.tools.r8.graph.j0.b(SourceFile:10)
	at com.android.tools.r8.shaking.MainDexListBuilder.isAnnotationWithEnum(MainDexListBuilder.java:14)
.....
is this code valid? I mean can I reference annotation to itself? because when I decompile it to java,
ParamType[]
gets highlight and says
Cyclic annotation element type
.