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
66 stars 54 forks source link

Get Data from the Internet #108

Open Relentlesslba opened 5 months ago

Relentlesslba commented 5 months ago

URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-getting-data-internet?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-5-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-getting-data-internet#7

Specify the language of the codelab if it is not English:

In which task and step of the codelab can this issue be found? Step 8 of 'Get data from the internet'

Describe the problem This suggested code: id("org.jetbrains.kotlin.plugin.serialization") version "1.8.10"

Causes the app to crash because the factory cannot be created. The solution code uses version 1.9.10 of this plugin, which works.

Steps to reproduce?

  1. Follow the instructions in the 'Get data from the internet' codelab
  2. Complete step 8, serializing the data from the web into a list of objects from JSON instead of a String
  3. See error: java.lang.IllegalArgumentException: Unable to create converter for java.util.List

Versions Android Studio version: Android Studio Hedgehog | 2023.1.1 Patch API version of the emulator:

Additional information Include screenshots if they would be useful in clarifying the problem.