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

Android studio 在打包时报错如下:

Lint found fatal errors while assembling a release target.

To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
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
    }
}

解决方法:

。Android Studio里,每个model下都有一个build.gradle。我们需要把如下代码添加到各个model下的build.gradle

 

android {
    compileSdkVersion 24
    buildToolsVersion '26.0.2'

 

    lintOptions {
        abortOnError false
    }

你可能感兴趣的:(移动开发)