Hello. I am updating serialization to 1.1.0-RC, an...
# serialization
t
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:
Copy code
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:
Copy code
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
added commonMain
m
I have that often. Usually fixed by reopening the project.
t
Cool, thank you for the tip. And now I am getting some odd Kotlin.Result ClassCastException. 😞
m
t
That could be it. I have a method that takes a callback reference which sends back a Result, like so:
Copy code
fun updateToken(completion: (Result<String>) -> Unit) {
and when it is called it is saying:
Copy code
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!