gpt4 book ai didi

android - "LintError"发现正在处理 android lint 报告

转载 作者:行者123 更新时间:2023-11-29 01:33:00 25 4
gpt4 key购买 nike

我已经生成了 Lint 文件结果(通常命名为 lint-results.xml)并在 Android Studio 中正确配置了 android 项目来运行 Sonar (使用 sonar-runner)。

当我执行 sonar-runner 时,我得到了下一个错误:

INFO 13:49:02.776 > 13:49:02.776 INFO  - Sensor org.sonar.plugins.android.lint.AndroidLintSensor@5d5f10b2
INFO 13:49:02.832 > 13:49:02.832 INFO - Processing android lint report: C:\Code\Android\Project\app\lint-results.xml
INFO 13:49:03.477 > 13:49:03.475 WARN - Unable to find rule for LintError
[...]
INFO 13:49:03.505 > 13:49:03.505 WARN - Unable to find file C:\Code\Android\Project\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-ads\7.3.0\AndroidManifest.xml to report issue
[...]
INFO 13:49:04.678 > 13:49:04.678 INFO - Sensor org.sonar.plugins.android.lint.AndroidLintSensor@5d5f10b2 (done) | time=1902ms

是什么导致了这些错误?

最佳答案

我应该更深入地研究 lint-results.xml 文件。该错误在那里得到了充分解释。就我而言:

<?xml version="1.0" encoding="UTF-8"?>
<issues format="4" by="lint 24.1.2">

<issue
id="LintError"
severity="Error"
message="No `.class` files were found in project &quot;debug&quot;, so none of the classfile based checks could be run. Does the project need to be built first?"
category="Lint"
priority="10"
summary="Lint Failure" explanation="This issue type represents a problem running lint itself. Examples include failure to find bytecode for source files (which means certain detectors could not be run), parsing errors in lint configuration files, etc.
These errors are not errors in your own code, but they are shown to make it clear that some checks were not completed.">
<location file="C:\Code\Android\TestApp\app\build\intermediates\manifests\androidTest\debug"/>
</issue>

因此消息告诉我由于依赖关系问题,项目尚未完全构建。

解决该错误后,一切正常。

关于android - "LintError"发现正在处理 android lint 报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30196812/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com