icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
995 stars 95 forks source link

Deserializer for declaration public kotlinx.coroutines/cancel|-8901161077954086727[0] is not found #136

Closed sergio11 closed 3 years ago

sergio11 commented 3 years ago

Hello, I am having a problem using the latest version of this library in my project based on kotlin 1.5.10 / coroutines 1.5.0

> Task :shared:linkDebugFrameworkIos FAILED
e: Compilation failed: Deserializer for declaration public kotlinx.coroutines/cancel|-8901161077954086727[0] is not found

 * Source files: 
 * Compiler version info: Konan: 1.5.10 / Kotlin: 1.5.10
 * Output kind: STATIC_CACHE

e: java.lang.IllegalStateException: Deserializer for declaration public kotlinx.coroutines/cancel|-8901161077954086727[0] is not found

I understand that the problem is due to the version 1.4.2 of coroutinas that incorporates the library, I have tried to force to use the 1.5.0 in the root build.gradle file as follows.

allprojects {
    repositories {
        google()
        mavenCentral()
        maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
    }
    configurations.all {
        resolutionStrategy {
            force("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-native-mt")
        }
    }
}

But this doesn't work, is it possible to use Moko MVVM version 0.10.1 in my project with kotlin coroutines 1.5.0-native-mt and kotlin 1.5.10?

Thank you

Alex009 commented 3 years ago

hi! while we not publish mvvm with kotlin coroutines 1.5.0 version - you can't use 1.5.0 coroutines in your project with mvvm. in june we plan to update all moko stack to 1.5.10 kotlin and 1.5.0 coroutines