I had an internal discussion on the requirements for a serialVersionUID when coding in Kotlin, specifically for the Android platform. In Java we always added it, since Android Studio makes it real easy. However, there is no help there for Kotlin whatsoever. This made us question the requirement in Kotlin for serialVersionUID.
What are your thoughts on this;
I'm eager to hear your opinions.
serialVersionUID
is only used by Java serialization (java.io.Serializable
). Most Android applications use Android-specific serialization (Parcelable
), because it's more efficient. If your application does not use Java serialization, there is no benefit in including serialVersionUID
in your classes, regardless of whether you're using Java or Kotlin.