当前位置: 首页 > 知识库问答 >
问题:

任务“:app:LintVitalRelease”flutter文件选取器执行失败

林曦之
2023-03-14

我正在使用flutter文件拾取器插件,这需要一个升级的梯度。所以我升级了我的分级,如下所示。

项目-分级

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分级

compileSdkVersion 29


    defaultConfig {
    applicationId "****"
    minSdkVersion 16
    targetSdkVersion 29
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

分级包装机

#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

错误

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

这在调试模式下工作,但对于发行版appbundle或apk,我得到这个错误

共有1个答案

郭永安
2023-03-14

转到android/app/build.gradle

lintOptions {
    disable 'InvalidPackage'
    checkReleaseBuilds false <- add this
}

这样就可以解决问题了

 类似资料: