0

I have issue with gradle how to solve this

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.

  • What went wrong: Execution failed for task ':app:mergeDebugJavaResource'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform sqlite-framework-2.1.0.jar (androidx.sqlite:sqlite-framework:2.1.0) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not find sqlite-framework-2.1.0.jar (androidx.sqlite:sqlite-framework:2.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.jar

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================

2: Task failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform sqlite-framework-2.1.0.jar (androidx.sqlite:sqlite-framework:2.1.0) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not find sqlite-framework-2.1.0.jar (androidx.sqlite:sqlite-framework:2.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.jar

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================

3: Task failed with an exception.

  • What went wrong: Execution failed for task ':app:mergeDebugNativeLibs'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform sqlite-framework-2.1.0.jar (androidx.sqlite:sqlite-framework:2.1.0) to match attributes {artifactType=android-jni, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not find sqlite-framework-2.1.0.jar (androidx.sqlite:sqlite-framework:2.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.jar

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 16s 25 actionable tasks: 6 executed, 19 up-to-date

enter code here
plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.parsa.myapplication2"
        minSdk 21
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        targetSdkVersion 30
    }

    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'
    }
    compileSdkVersion 30
    buildToolsVersion '30.0.2'
}

dependencies {

    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    def koin_version="3.1.2"
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation "io.insert-koin:koin-android:$koin_version"
    implementation "io.insert-koin:koin-android-compat:$koin_version"
    implementation "io.insert-koin:koin-androidx-workmanager:$koin_version"
    implementation "io.insert-koin:koin-androidx-compose:$koin_version"
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.google.code.gson:gson:2.8.8'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.9'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'


    def nav_version = "2.3.2"
    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
    implementation "androidx.navigation:navigation-runtime-ktx:$nav_version"

    implementation "androidx.viewpager2:viewpager2:1.0.0"
    implementation 'com.facebook.fresco:fresco:2.5.0'
    implementation 'com.tbuonomo:dotsindicator:4.2'

}
MikeT
  • 51,415
  • 16
  • 49
  • 68
Parsa Gh
  • 3
  • 1
  • 3

1 Answers1

1

Got the solution. In the build.gradle file in app folder, as I can see, you have not added any implementation for sqlite. Remove the older implementation and add this:

implementation 'androidx.sqlite:sqlite-framework:2.2.0-alpha01'

JustinW
  • 2,567
  • 1
  • 13
  • 29