Search code examples
androidandroid-studiokotlingradledependencies

Understanding and figurering out which versions to use, currently stock


I'm trying to understand and debug which version is correct to use, however searching and trying hasn't done much yet.

e: C:/Users/user/.gradle/caches/transforms-2/files-2.1/7980168ed644bcd1d1c470386ac7a470/jetified-kotlin-stdlib-1.5.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: C:/Users/user/.gradle/caches/transforms-2/files-2.1/94de443224b407a2011360fdde6bd78b/jetified-core-ktx-1.6.0-api.jar!/META-INF/core-ktx_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: C:/Users/user/.gradle/caches/transforms-2/files-2.1/c59da2ac229afacb8c7416996b012d0d/jetified-kotlin-stdlib-common-1.5.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.

These are the errors I'm getting, for me i looks like I need to change implementation 'androidx.core:core-ktx:1.6.0' to 1.1.16, but that one cannot be find, these are my build.gradle

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 30
    defaultConfig {
        applicationId "com.example.myapp"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.google.android.gms:play-services-location:18.0.0'
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation 'com.google.android.gms:play-services-location:18.0.0'
    implementation 'com.github.kittinunf.fuel:fuel:2.3.1' //Core package
    implementation 'com.github.kittinunf.fuel:fuel-android:2.2.1' //Android
    implementation 'com.github.kittinunf.fuel:fuel-gson:2.2.1' //Fuel Gson
    implementation 'com.google.code.gson:gson:2.8.6' //Gson
    implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
}

Can someone tell me how to debug this and thus knowing what versions to use?

Thanks,emphasized text


Solution

  • Doing some more research here on the site, I've found an answer that I've overseen before, but I got it working by the help of this post. (did also change the things in the other answers in that post, so you might need to change more from that post)

    https://stackoverflow.com/a/68061290/16448146