Android Lint简介

英文原文: http://tools.android.com/tips/lint 
参照文章: http://blog.csdn.net/thl789/article/details/8037473
一、简介
Android Lint 是SDK Tools 16 (ADT 16)之后才引入的工具,通过它对Android工程源代码进行扫描和检查,可发现潜在的问题,以便程序员及早修正这个问题。Android Lint提供了命令行方式执行,还可与IDE(如Eclipse)集成,并提供了html形式的输出报告。
由于Android Lint在最初设计时就考虑到了independent于IDE,所以它可以很方便的与项目中的其他自动系统(配置/ Build / 测试等)集成.
Android <wbr>Lint简介

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(即不检查)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值