Kotlin 反射混淆器 SmallSortedMap

Kotlin reflect proguard SmallSortedMap

Warning: kotlin.reflect.jvm.internal.KClassImpl: can't find referenced class kotlin.reflect.jvm.internal.KClassImpl$kotlin.reflect.jvm.internal.KClassImpl$Data
Warning: kotlin.reflect.jvm.internal.KClassImpl: can't find referenced class kotlin.reflect.jvm.internal.KClassImpl$kotlin.reflect.jvm.internal.KClassImpl$Data
Warning: kotlin.reflect.jvm.internal.KClassImpl$data: can't find referenced class kotlin.reflect.jvm.internal.KClassImpl$kotlin.reflect.jvm.internal.KClassImpl$Data
Warning: kotlin.reflect.jvm.internal.KClassImpl$data: can't find referenced class kotlin.reflect.jvm.internal.KClassImpl$kotlin.reflect.jvm.internal.KClassImpl$Data
Warning: kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap: can't find referenced class kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$Entry
Warning: kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap: can't find referenced class kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$EntrySet
Warning: kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$Entry: can't find referenced class kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$Entry
Warning: kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$Entry: can't find referenced class kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap$Entry

我收到这些警告,这些警告破坏了我在任务 transformClassesAndResourcesWithProguardForAppRelease 上的发布构建。

我知道我可以忽略警告或使用 -dontwarn 通知 proguard 不发出警告,但我想知道是否有其他人遇到过这个问题并且实际上找到了正确的修复方法。

我使用的是 Kotlin 版本 1.1.4-2

引用 Alexander Udalov 从问题 KT-7652:

In any way, reflection failures when kotlin.* is obfuscated are expected at the moment. What we can do is work on a useful set of rules for proguard to minimize the binary size of the reflection library.

所以目前没有正确的解决方法。