skip to Main Content

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:
enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    This is typically due to a conflict between library versions. The solution is to specify the code down below.

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

  2. What is the version of kotlin that your IDE use?
    Try to upgrade to latest version of kotlin

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search