some kotlin library attached to the project where compile with newer kotlin compiler and it can't be read... No update found

Viewed 1922

Hi here I am try a payment project using Amazon Payment Services Android SDK. Here I am successfully done the payment functionality and it's works well. After implementing into main projects I got following issue.

some kotlin library attached to the project where compile with newer kotlin compiler and it can't be read... No update found

enter image description here

In My Gradle

buildscript {
    ext.kotlin_version = "1.6.0"
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://android-sdk.payfort.com" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

In Module

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdkVersion 31

defaultConfig {
    applicationId "com.android.paymentdemoapp"
    minSdkVersion 23
    targetSdkVersion 31
    versionCode 1
    versionName "1.0"
multiDexEnabled true

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget = '1.8'
}
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation("com.amazon:fortpayment:+:release@aar"){
        transitive = true
    }
}

I'm modifying the kotlin version(1.6.10 to 1.4.32) and 'build:gradle:4.1.0' to 4.1.2 clean and rebuild the project I got the following issue...

e: /Users/raja/.gradle/caches/transforms-2/files-2.1/2a57ced0732a783c670dc97c999acc46/jetified-core-ktx-1.8.0-alpha03-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.6.0, expected version is 1.4.2.

I'm tried to configure the kotlin version and Gradle build version different way but there is no use. Anyone please help me to fix this issue. Thanks in advance.

0 Answers
Related