[英]Why is my Travis-CI build still failing?
For the last four builds, all of them have failed but I can not figure out why. 对于最后四个版本,所有这些都失败了,但我不知道为什么。 It is giving me an error, but when I check the code in my IDE (Android Studio), I have no errors, but just warnings.
它给我一个错误,但是当我在IDE(Android Studio)中检查代码时,没有任何错误,只是警告。 Is it interpreting the warnings as errors?
是否将警告解释为错误? Here is the error given by the log:
这是日志给出的错误:
Lint found 1 errors and 6 warnings
:mobile:lint FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mobile:lint'.
> Lint found errors in the project; aborting build.
This is because your gradle is configured to fail the build if your code does not match LINT rules. 这是因为如果您的代码与LINT规则不匹配,则gradle配置为无法通过构建。
You can do any of the following attempts: 您可以进行以下任何尝试:
Fix everything in your code that LINT complains about (Most recommended) 修复LINT抱怨的代码中的所有内容(推荐)
Silence the lint by setting quiet mode or abortOnError
to false: 通过将安静模式或
abortOnError
设置为false,使棉绒静音:
lintOptions {
quiet true
checkReleaseBuilds false
// if true, stop the gradle build if errors are found
abortOnError false
}
lint
at the beginning of your tasks lint
开头的gradle任务
tasks.whenTaskAdded { task ->
if (task.name.equals("lint")) {
task.enabled = false
}
}
-x lint
argument like: gradlew assemble -x lint
-x lint
参数运行构建任务,例如: gradlew assemble -x lint
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.