1 year ago
    Hi, I am trying to integrate a KMM library into my existing android project but I am getting this error when I try to run the app
    Duplicate class kotlinx.coroutines.AbstractCoroutine found in modules jetified-kotlinx-coroutines-core-1.3.5.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5) and jetified-kotlinx-coroutines-core-jvm-1.3.9-native-mt-2.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.3.9-native-mt-2
    My android app uses following versions
    const val coroutines_core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5"
        const val coroutines_android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5"
        const val coroutines_test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.5"
    But my KMM library uses
    Any idea how can I resolve this?
    This is what I ended up doing
    implementation('<My multiplatform library>') {
            exclude group: 'org.jetbrains.kotlinx', module:'kotlinx-coroutines-core-jvm'