https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
g

Gleb

02/26/2024, 5:39 PM
Hello folks! I'm trying to use the ktor http client following this tutorial. I have all the same dependencies, yet the
Json
symbol cannot be found, as shown in the screenshots. I don't have much experience with gradle and I struggle with even properly forming up a google search for this issue, so any help would be appreciated thanks Upd: looks like there's a conflict caused by
decompose
Upd 2: Solved by introducing an implementation of the serialization-json into my build.gradle It's the 2nd time now that I've figured out the solution on my own after posting here after days of struggle 🥲
a

Arkadii Ivanov

02/26/2024, 6:57 PM
Not sure how it can be related to Decompose. I would also add "org.jetbrains.kotlinxkotlinx serialization json<version>" to dependency list.
g

Gleb

02/26/2024, 7:04 PM
@Arkadii Ivanov after commenting out the implementation for
com.arkivanov.decompose:decompose
the issue got resolved so I looked into the source code of decompose and found the dependencies in the image (line 12 and 53). So I added
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
and it all got solved
👍 1
👍🏼 1
a

Arkadii Ivanov

02/26/2024, 7:06 PM
Yes, Decompose uses json serialization as implementation details.
👍🏼 1
g

Gleb

02/26/2024, 7:23 PM
@Giovanny Velez no, I haven't! well now I know what to read tonight, thanks
3 Views