Failed to transform bcprov-jdk18on-1.72.jar (org.bouncycastle:bcprov-jdk18on:1.72) to match attributes {artifactType=processed-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime} in Flutter – Solution

Error:

  • What went wrong:
    Execution failed for task ‘:app:lintVitalRelease’.

Could not resolve all artifacts for configuration ‘:url_launcher_android:debugUnitTestRuntimeClasspath’.
Failed to transform bcprov-jdk18on-1.72.jar (org.bouncycastle:bcprov-jdk18on:1.72) 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/apple/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk18on/1.72/d8dc62c28a3497d29c93fee3e71c00b27dff41b4/bcprov-jdk18on-1.72.jar.
Failed to transform ‘/Users/apple/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk18on/1.72/d8dc62c28a3497d29c93fee3e71c00b27dff41b4/bcprov-jdk18on-1.72.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).

  • 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.

If you are getting the above error during running an Flutter or Android app, then you should check the following solution:-

Solution: –

Just add the following gradle block inside your app/build.gradle.

// ADD this block inside android{} in app/build.gradle
  lintOptions {
        disable 'InvalidPackage'
        disable "Instantiatable"
        checkReleaseBuilds false
        abortOnError false
    }

For example:

Leave a Reply