Mongo DB Realm + Kotlin Coroutines - Cannot find a version of 'org.jetbrains.kotlinx:kotlinx-coroutines-core' that satisfies the version constraints

I’m trying to use Mongo DB Realm in my Android app. I’ve added those two dependencies:

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-native-mt"
implementation "io.realm.kotlin:library-sync:1.0.2"

Along with the plugin:

id 'io.realm.kotlin'

and

id 'io.realm.kotlin' version '1.0.2' apply false

But I’m getting this strange error, and not sure why exactly…

Caused by: org.gradle.api.GradleException: Cannot find a version of ‘org.jetbrains.kotlinx:kotlinx-coroutines-core’ that satisfies the version constraints. It’s just a fresh Android Studio project, and I’m trying to setup the Mongo DB realm.

Can someone help me out with this please?

Hi @111757 ,

This is typically due to a conflict between library versions: try to modify the build.gradle with something like

implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-native-mt") {
        version {
            strictly("1.6.0-native-mt")
        }
    }
2 Likes

Wow that actually worked! Thanks!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.