I am getting lint error Error: This class implements Parcelable but does not provide a CREATOR field [ParcelCreator]
My data class:
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
@Parcelize
data class PhoneNumber(val countryCode:String, val number:String) : Parcelable{
val completeNumber:String get() = countryCode + number
}
Kotlin version :
ext.kotlin_version = '1.5.21'
Plugins in build.gradle in app module
plugins {
id 'com.android.application'
id 'com.github.triplet.play' version '3.0.0'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'com.apollographql.apollo'
id 'com.google.firebase.crashlytics'
id 'com.google.gms.google-services'
}
But in kotlin 1.3.61 i don't get lint error with kotlin-android-extensions
After migrating to kotlin-parcelize i am getting this lint error.
Please help me to resolve this lint error
After upgrading
com.android.tools.build:gradle version 4.1.0 to 7.0.0
and
com.github.triplet.play version 3.0.0 to 3.6.0
lint issue resolved.
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