英文原文:http://tools.android.com/tips/lint
参照文章:http://blog.csdn.net/thl789/article/details/8037473
http://blog.csdn.net/hudashi/article/details/8333349
Android Lint是SDK Tools 16 (ADT 16)之后才引入的工具,通过它对Android工程源代码进行扫描和检查,可发现潜在的问题,以便程序员及早修正这个问题。Android Lint提供了命令行方式执行,还可与IDE(如Eclipse)集成,并提供了html形式的输出报告。
由于Android Lint在最初设计时就考虑到了independent于IDE,所以它可以很方便的与项目中的其他自动系统(配置/ Build / 测试等)集成.
Android Lint主要用于检查以下这些错误:
1、Missing translations (and unused translations)没有翻译的文本
2、Layout performance problems (all the issues the old layoutopt tool used to find, and more)
3、Unused resources未使用的冗余资源
4、Inconsistent array sizes (when arrays are defined in multiple configurations)在多个配置中的数组大小不一致文件
5、Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc)
6、Icon problems (like missing densities, duplicate icons, wrong sizes, etc)
7、Usability problems (like not specifying an input type on a text field)
8、Manifest errors
当然Android Lint远远不至检查以上的错误,更多的内容请参考《Android Lint 检查规则列表》
在Eclipse中可以在菜单Window->Preference->“Lint Eerro checking”中设置规则的检查级别,如图1所示。
检查级别可以是:
Default
Fatal
Errro
Waring
Information
Ingore(即不检查)
详见参考文章。
分享到:
相关推荐
Android Lint简介和使用方法
sonar Android Lint插件
Android自定义Lint检查
Lin是一个让Android Lint更简单的工具
Android Lint checks. It uses Java byte code instrumentation to collect and report performance statistics per detector for a Lint analysis invoked from Gradle. It relies on YourKit Probes to do the ...
生成自定义Android lint检查并让lint警告您的代码可能正在使用Kotlin扩展或您自己的编码约定处理
Android Lint Plugin for Jenkins Parses output from the Android lint tool and displays the results for analysis. https://wiki.jenkins-ci.org/display/JENKINS/Android Lint Plugin
不推荐使用:适用于Jenkins的Android Lint插件 所有功能已集成到。 另请参阅: 。
查看你的android lint风格问题。
lint - 自定义lint规则
Android Lint 这是一个通用Android Lint库,你可以用它来检查代码规范,bug,资源命名等 :victory_hand: 。 本库最大特点是通用,相较于其他Lint库(规则直接在代码写死),最大的不同是,规则全靠配置生成,更加...
The Android lint tool is a static code analysis tool that checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, ...
anger-android_lint基于gradle的Android项目的Lint文件。 通过全局gems安装$ $ gem installanger-android_lint通过Bundler将以下行添加到您的Gemfile中,然后ruanger-android_lint基于gradle的Android项目的Lint文件...
危险-android_lint 基于gradle的Android项目的Lint文件。 安装 通过全球宝石 $ gem install danger-android_lint 通过邦德勒 将以下行添加到您的Gemfile中,然后运行bundle install : gem 'danger-android_lint' ...
GitHub行动:使用reviewdog运行Android Lint 此操作使用带有运行。 输入项 github_token 必填项。 必须采用github_token: ${{ secrets.github_token }}形式github_token: ${{ secrets.github_token }} 。 lint_xml...
采用更漂亮的方式展示Android Lint问题
Android lint 规则添加一些规则结帐后,将local.properties.dist复制到local.properties 。 该文件中提供的路径应该是正确的,以便 lint 找到自定义规则。 然后运行: gradle assemble uploadArchives在任何带有...
为您的Android项目轻松设置CheckStyle,FindBugs,PMD和Lint
这个存储库保存的lint检查不是标准android工具包的一部分,但对开发人员仍然有帮助。
Android——Android lint工具项目资源清理 最近维护的项目已经有两年多,经过很多前辈的迭代,项目并没有变得健壮,而变得很臃肿.用Android lint工具清理了一次,清楚了不少废弃的布局和资源. 1. Android lint工具 可以...