kotlinx.serialization

Getting kotlinx serialization working in multiplatform project

不羁的心 提交于 2020-06-29 06:43:31
问题 I'm taking Kotlin seriazliation for a test drive in a multiplatform project in Kotlin 1.4-M2, following the tutorial on github, but i'm not getting the serialization bit to compile. This is my build.gradle.kts plugins { val kotlinVersion = "1.4-M2" kotlin("multiplatform") version kotlinVersion kotlin("plugin.serialization") version kotlinVersion } repositories { mavenCentral() maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") } maven { url = uri("https://kotlin.bintray.com/kotlinx

Class X is not abstract and does not implement fun writeToParcel() defined in android.os.Parcelable

你离开我真会死。 提交于 2020-01-13 08:18:10
问题 In my Android app, I want to add a Bundle including a Place object described below to my Intent. Since serializable was slow and not recommended, I preferred Parcelable. Althoug I use Kotlin 1.3.31, I have problems parcelizing some data classes. Example: import android.os.Parcelable import kotlinx.android.parcel.Parcelize @Parcelize data class Place(val street: String, val postal: String, val city: String) : Parcelable and Android Studio complains: Class 'Place' is not abstract and does not