google-developer-training / basic-android-kotlin-compose-training-mars-photos

Solution code for Android Basics in Kotlin course
https://developer.android.com/courses/android-basics-kotlin/course?gclid=CjwKCAjw4c-ZBhAEEiwAZ105RTyT-iaLHzrhMBUXdMhO230ZDwOwxxI2x4RgK8DwBxK8t1h0wmU_QxoCi4YQAvD_BwE
Apache License 2.0
72 stars 66 forks source link

Unable to create converter #107

Closed yaroslavzghoba closed 5 months ago

yaroslavzghoba commented 8 months ago

At the end of step 8 of the "Get data from the internet" codelab, when trying to run the application, we get the following exception:

java.lang.IllegalArgumentException: Unable to create converter for java.util.List for method MarsApiService.getPhotos

Everything starts to work fine if you change the version of the 'kotlinx.serialization' plugin added in the same step from 1.8.10 to 1.9.10 as done in the following codelabs.

peterMonteer commented 6 months ago

Yeah I think the problem is that it doesn't match the plugin " id("org.jetbrains.kotlin.android") version "1.9.10" apply false" declared at project level.

The solutions seem to be:

Add the serialization plugin at project and applevel with the version you want to use Match the serialization plugin version with the kotlin.android plugin version