Home > database >  Problem on building apk file for flutter app
Problem on building apk file for flutter app

Time:01-10

I just finished running my app and wanted to release the apk file for it however this error appears.

Does anyone know how to fix it?

Execution failed for task ':app:lintVitalRelease'.

Could not resolve all artifacts for configuration ':flutter_local_notifications: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: C:\Users\FX505DD.gradle\caches\modules-2\files-2.1\org.bouncycastle\bcprov-jdk15on\1.68\46a080368d38b428d237a59458f9bc915222894d\bcprov-jdk15on-1.68.jar

Failed to transform 'C:\Users\FX505DD.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.)

CodePudding user response:

Alright i found the best answer just do this and it will work

1. - Replace build.gradle

classpath 'com.android.tools.build:gradle:4.1.0'

With

classpath 'com.android.tools.build:gradle:7.1.2'

2. - Replaced gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

With

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
  • Related