Lint found fatal errors while assembling a release target

在进行release包打包时,会提示如下错误:

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      
 	}
}

上面大概的意思就是让我们在app moudle下的build.gradle文件中添加如上内容,这样在编译的时候不进行lint错误的检查,虽然这样能够解决问题,但是内心有些不安,查找资料后得知,打开app/build/reports/lint-results-release-fatal.html 文件,里边的内容有描述造成lint检测错误的具体内容,根据里边的错误提示我们就可以解决问题了,我的错误原因是在layout-land中存在的xml文件在layout文件夹中没有,所以知道原因后解决问题就比较简单了。

你可能感兴趣的:(Android问题及解决,lint)