Flutter 打包 Execution failed for

2020-11-15  本文已影响0人  Juanlin

报错内容

org.gradle.api.tasks.TaskExecutionException:Executionfailedfortask':app:lintVitalRelease'.Toproceed,either fix the issues identified by lint,or modify your build scriptasfollows:

执行lintVitalRelease失败了,存在致命错误,同时还会提示

android{lintOptions{checkReleaseBuildsfalse// Or, if you prefer, you can continue to check for errors in release builds,// but continue the build even when errors are found:abortOnErrorfalse}}

简单的理解就是提示你可以忽略错误,这两项的配置内容意思是:

//所有正式版构建执行规则生成崩溃的lint检查,如果有崩溃问题将停止构建checkReleaseBuildstrue// 如果为 true,则当lint发现错误时停止 gradle构建abortOnErrorfalse

具体原因是在lint插件在检查代码的时候发现了代码存在不符合规范的地方,lint是Android提供的一个静态代码检查的工具,在gradle的构建task中执行了link检查。

Android或者Flutter 打包 Execution failed for task ':app:lintVitalRelease'.的问题

报错内容

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:lintVitalRelease'.

To proceed, either fix the issues identified by lint, or modify your build script as follows:

执行lintVitalRelease失败了,存在致命错误,同时还会提示

android {

    lintOptions {

        checkReleaseBuilds false

        // Or, if you prefer, you can continue to check for errors in release builds,

        // but continue the build even when errors are found:

        abortOnError false

    }

}

简单的理解就是提示你可以忽略错误,这两项的配置内容意思是:

      //所有正式版构建执行规则生成崩溃的lint检查,如果有崩溃问题将停止构建

        checkReleaseBuilds true

      // 如果为 true,则当lint发现错误时停止 gradle构建

        abortOnError false

具体原因是在lint插件在检查代码的时候发现了代码存在不符合规范的地方,lint是Android提供的一个静态代码检查的工具,在gradle的构建task中执行了link检查。

上一篇 下一篇

猜你喜欢

热点阅读