Mr. Tayyab MuGhal
Mr. Tayyab MuGhal

Reputation: 2351

image_picker_android:debugUnitTestRuntimeClasspath

Could not resolve all artifacts for configuration ':image_picker_android:debugUnitTestRuntimeClasspath'. Failed to transform bcprov-jdk15on-1.68.jar (org.bouncycastle:bcprov-jdk15on:1.68) to match attributes {artifactType=processed-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Execution failed for JetifyTransform: /Users/thor/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.68/46a080368d38b428d237a59458f9bc915222894d/bcprov-jdk15on-1.68.jar. > Failed to transform '/Users/thor/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.68/46a080368d38b428d237a59458f9bc915222894d/bcprov-jdk15on-1.68.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.) Suggestions: - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there. - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

BUILD FAILED in 1m 18s

Upvotes: 8

Views: 3631

Answers (3)

Bill_The_Coder
Bill_The_Coder

Reputation: 2510

I added following lines in the android section of app level build.gradle of my project.

   lintOptions {
        disable 'InvalidPackage'
        disable "Instantiatable"
        checkReleaseBuilds false
        abortOnError false
    }

And every thing started to work fine. Check out my Gradle File

Upvotes: 4

Adeel Nazim
Adeel Nazim

Reputation: 724

There are not many things to do just go to android/app/build.grade and add this line

  lintOptions { 
    
        checkReleaseBuilds false
        }

to your code after android { like

android {
    compileSdkVersion 31

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
    lintOptions { 

    checkReleaseBuilds false
    }

Upvotes: 1

aliakbar moradhaseli
aliakbar moradhaseli

Reputation: 41

I tried adding the following under buildTypes { release {... of android/app/build.grade

buildTypes {

    release {

        lintOptions {

            disable 'InvalidPackage'
            disable "Instantiatable"
            checkReleaseBuilds false
            abortOnError false

        }

        signingConfig signingConfigs.release
    }
}

Upvotes: 4

Related Questions