问题描述
当我在命令行上运行以下命令时:
When I run the following on a command line:
./gradlew -lint
我得到的结果与在 Android Studio 中选择以下菜单选项不同.
I get different results than if I choose the following menu option within Android Studio.
Analyze->Inspect Code...
谁能解释一下?这是正常的吗?谨慎的开发人员是否应该同时运行两者以发现他/她的项目的所有潜在问题?
Can anyone explain this? Is this normal? Should a prudent developer run both in order to find all potential problems with his/her project?
推荐答案
在 Android Studio 中,您可以通过 Preferences > Inspections 自定义运行哪些检查;您可能禁用了一些 Lint 检查,并非所有检查都在默认情况下运行.Android Studio 还可以运行大量非 Lint 检查.
In Android Studio you can customize what inspections are run via Preferences > Inspections; you may have some Lint inspections disabled, and not all run by default. Android Studio can also run a great number of non-Lint inspections.
这篇关于通过 Android Studio 菜单和 gradlew 命令行运行 lint 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!