You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i get error: java.lang.IllegalArgumentException: Cannot serialize Kotlin type com.learn.testkt.moshi.StatisConfig. Reflective serialization of Kotlin classes without using kotlin-reflect has undefined and unexpected behavior. Please use KotlinJsonAdapterFactory from the moshi-kotlin artifact or use code gen from the moshi-kotlin-codegen artifact.
but i modify like this,everything is well!??why?
@Keep
classStatisConfig : QualitieItemJsonData() {
@Json(name ="h265Encode")
var h265Encode:Boolean=false
@Json(name ="h265Decode")
var h265Decode:Boolean=false
}
kotlin version 1.7.10
implementation "com.squareup.moshi:moshi-kotlin:1.14.0"
The text was updated successfully, but these errors were encountered:
The KotlinJsonAdapterFactory requires the primary constructor, so the constructor():super() is breaking it. The error message should be better, though.
i get error: java.lang.IllegalArgumentException: Cannot serialize Kotlin type com.learn.testkt.moshi.StatisConfig. Reflective serialization of Kotlin classes without using kotlin-reflect has undefined and unexpected behavior. Please use KotlinJsonAdapterFactory from the moshi-kotlin artifact or use code gen from the moshi-kotlin-codegen artifact.
but i modify like this,everything is well!??why?
kotlin version 1.7.10
implementation "com.squareup.moshi:moshi-kotlin:1.14.0"
The text was updated successfully, but these errors were encountered: