flutter: can not build android apk

前端 未结 9 2410
心在旅途
心在旅途 2020-12-16 18:35
FAILURE: Build failed with an exception.
  • What went wrong: Execution failed for task \':app:lintVitalRelease\'.

    Coul

9条回答
  •  孤城傲影
    2020-12-16 19:27

    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.

提交回复
热议问题