FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:lintVitalRelease'.
Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'. Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}. Execution failed for JetifyTransform: E:\AndroidStudioProjects\FlutterProject\EduyaariGuruFlutter\eduyaari_guru_flutter\build\app\intermediates\flutter\debug\libs.jar. Failed to transform 'E:\AndroidStudioProjects\FlutterProject\EduyaariGuruFlutter\eduyaari_guru_flutter\build\app\intermediates\flutter\debug\libs.jar' using Jetifier. Reason: FileNotFoundException, message: E:\AndroidStudioProjects\FlutterProject\EduyaariGuruFlutter\eduyaari_guru_flutter\build\app\intermediates\flutter\debug\libs.jar (The system cannot find the path specified). (Run with --stacktrace for more details.) Please file a bug at http://issuetracker.google.com/issues/new?component=460323.
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
BUILD FAILED in 1m 8s
Step 1. flutter build apk --debug
Step 2. flutter build apk --profile
Step 3. flutter build apk --release
The only solution that worked for me was downgrading the gradle.build from
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
to
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
and changed the gradle-warpper.properties from
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
to
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
Here you can see why you should not just add lintOptions { checkReleaseBuilds false }
on the gradle.
I found the workaround I needed for my case, I believe it will work for you as well.
I've set the checkReleaseBuilds
flag to false
in the android's app-level build.gradle
like so:
android {
...
lintOptions {
checkReleaseBuilds false
}
}
Found it here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With