[英]Execution failed for task ':app:lintVitalRelease' flutter file picker
I'm using flutter file picker plugin which requires an upgraded gradle.我正在使用 flutter 文件选择器插件,它需要升级的 gradle。 So I upgraded my gradle, as shown below.
于是我升级了我的gradle,如下图。
Project-gradle项目级
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
App-Gradle App-Gradle
compileSdkVersion 29
defaultConfig {
applicationId "****"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Gradle-Wrapper Gradle 包装器
#Fri Jun 23 08:50:38 CEST 2017
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
THE ERROR错误
* 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: B:\*directory*\build\app\intermediates\flutter\debug\libs.jar.
This works in debug mode, but for the release appbundle or apk, I get this error这适用于调试模式,但对于发布 appbundle 或 apk,我收到此错误
go to android/app/build.gradle go 到 android/app/build.gradle
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false <- add this
}
flutter clean and this should solve the problem flutter 清洁,这应该可以解决问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.