Thread
#serialization
    tylerwilson

    tylerwilson

    1 year ago
    Hello. I am updating serialization to 1.1.0-RC, and using Kotlin 1.4.30-RC (latest available for Canary), but I get this error:
    Could not find org.jetbrains.kotlin:kotlin-stdlib-common:1.4.30-270.
    Required by:
        project :salonbiz-library > org.jetbrains.kotlinx:kotlinx-serialization-core:1.1.0-RC
        project :salonbiz-library > org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0-RC
    Do I perhaps have to add an explicit dependency to stdlib, or something else going on?
    Yeah, that appeared to fix the gradle sync issue:
    implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
    added commonMain
    m

    Marc Knaup

    1 year ago
    I have that often. Usually fixed by reopening the project.
    tylerwilson

    tylerwilson

    1 year ago
    Cool, thank you for the tip. And now I am getting some odd Kotlin.Result ClassCastException. 😞
    m

    Marc Knaup

    1 year ago
    tylerwilson

    tylerwilson

    1 year ago
    That could be it. I have a method that takes a callback reference which sends back a Result, like so:
    fun updateToken(completion: (Result<String>) -> Unit) {
    and when it is called it is saying:
    java.lang.ClassCastException: java.lang.String cannot be cast to kotlin.Result
    And this is in the release 1.4.30? uh-oh. I do this in many, many places.
    Thank you for the link. I tried setting useIR to false, but no change. Back to 1.4.21-2 I go. Thanks again!