找不到引用 class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

Can't find referenced class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

当使用 Kotlin 为 Android 项目启用 ProGuard 时,Gradle 构建失败并出现以下错误:

Warning: HomeChargerLocation: can't find referenced class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

Warning: HomeChargerLocation$Address: can't find referenced class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

Warning: HomeChargerLocation$Address$Creator: can't find referenced class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

Warning: HomeChargerLocation$Car: can't find referenced class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

Warning: HomeChargerLocation$Car$Creator: can't find referenced class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

Warning: HomeChargerLocation$Creator: can't find referenced class kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.

对应类:https://gist.github.com/makovkastar/cfa4bf1bea38556279f20eef46001cf8

我认为它与 Kotlin 实验包中的 @Parcelize 注释有关,因为我们开始使用它时出现了问题。

更新:我在 Kotlin 错误跟踪器中创建了一个问题 - https://youtrack.jetbrains.com/issue/KT-21628

Kotlin 1.2.20 中已 fixed 存在该问题。