簡體   English   中英

任務 ':app:lintVitalRelease' flutter 文件選擇器執行失敗

[英]Execution failed for task ':app:lintVitalRelease' flutter file picker

我正在使用 flutter 文件選擇器插件,它需要升級的 gradle。 於是我升級了我的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

compileSdkVersion 29


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

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

錯誤

* 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,我收到此錯誤

go 到 android/app/build.gradle

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

flutter 清潔,這應該可以解決問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM