我有一个使用android构建工具版本1.3.1的gradle android构建,并对我的代码运行lint检查。当运行声纳任务(由org.sonarqube gradle插件提供)时,声纳lint插件(org.sonar.plugins.android.lint.AndroidLintSensor)在读取lint-result文件时失败,并出现以下错误:
2:35:44.278 [Daemon worker] ERROR o.s.p.a.lint.AndroidLintProcessor - Exception reading /Users/Rene/dev/gradleware/clients/bosch/trials/MyAndroidApplication/app/build/outputs/lint-results-freeRelease-fatal.xml
org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(inline=true, entry=, name=, data=false, empty=true, required=true, type=void) on field 'issues' java.util.List org.sonar.plugins.android.lint.AndroidLintProcessor$LintIssues.issues for class org.sonar.plugins.android.lint.AndroidLintProcessor$LintIssues at line 2
at org.simpleframework.xml.core.Composite.validate(Composite.java:644) ~[simple-xml-2.7.1.jar:na]
at org.simpleframework.xml.core.Composite.readElements(Composite.java:449) ~[simple-xml-2.7.1.jar:na]
at org.simpleframework.xml.core.Composite.access$400(Composite.java:59) ~[simple-xml-2.7.1.jar:na]
lint xml本身如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<issues format="4" by="lint 24.1.2">
</issues>
我正在使用sonarqube 5.2安装了android sonar插件1.1。这是一个已知的问题?或者有可用的解决方法吗?
答案 0 :(得分:3)
This is indeed a bug in android lint sonar plugin 1.1, see the ticket associated with this issue : https://jira.sonarsource.com/browse/SONARANDRO-38
This should be fixed in version 1.2 of the sonar android lint plugin.