cashapp / molecule

Build a StateFlow stream using Jetpack Compose
https://cashapp.github.io/molecule/docs/1.x/
Apache License 2.0
1.78k stars 76 forks source link

Fix sample-viewmodel running #430

Closed Goooler closed 1 month ago

Goooler commented 2 months ago
Caused by: java.lang.IllegalArgumentException: Cannot serialize Kotlin type com.example.molecule.viewmodel.PupperPicsApi$ListResponse.
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.
  at com.squareup.moshi.ClassJsonAdapter$1.create(ClassJsonAdapter.java:98)
  at com.squareup.moshi.Moshi.adapter(Moshi.java:146)
  at com.squareup.moshi.Moshi.adapter(Moshi.java:106)