When ProGuard is enabled for an Android project with Kotlin, the Gradle build fails with the following error:
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.
The corresponding classes: https://gist.github.com/makovkastar/cfa4bf1bea38556279f20eef46001cf8
I assume it has something to do with the @Parcelize
annotation from the Kotlin experimental package, because the problem appeared when we started using it.
UPDATE: I have created an issue in the Kotlin bug tracker - https://youtrack.jetbrains.com/issue/KT-21628
The issue has been fixed in Kotlin 1.2.20.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With