一、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 Lint主要用于检查以下这些错误:

  • Missing translations (and unused translations)没有翻译的文本
  • Layout performance problems (all the issues the old layoutopt tool used to find, and more)
  • Unused resources未使用的冗余资源
  • Inconsistent array sizes (when arrays are defined in multiple configurations)在多个配置中的数组大小不一致文件
  • Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc)
  • Icon problems (like missing densities, duplicate icons, wrong sizes, etc)
  • Usability problems (like not specifying an input type on a text field)
  • Manifest errors

当然Android Lint远远不至检查以上的错误,更多的内容请参考《Android Lint 检查规则列表》

二、问题描述

用gradle build命令时,经常由于lint错误终止,而这些错误又经常是第三方库中的,我们可以跳过这些错误,继续编译。在build.gradle中加入如下代码:

    lintOptions{        abortOnError false    }



更多相关文章

  1. Android中遇到的一切BUG(到目前为止,这是我笔记薄别瞎喷,错误欢
  2. You cannot combine custom titles with other title feature
  3. Ubuntu 11.10 64bit系统编译android 2.3的相关问题
  4. [qt for android]构建项目时,出现“过程试图写入的管道不存在”错
  5. 错误日志-Android家长端登陆不了
  6. Qt Android(安卓)部署项目时报错
  7. android studio 解决debug adb端口问题,亲身经历总结
  8. Androrat 编译运行错误集
  9. Android(安卓)常见错误处理

随机推荐

  1. Kotlin 配置dataBinding
  2. Android面试题(25)-Bundle机制
  3. android 物理键盘 关键因素
  4. 【Android】二、HelloWorld
  5. Android横竖屏切换Activity生命周期变化
  6. android studio错误: 常量字符串过长
  7. 【Android】【配置文件】gradle和manifes
  8. Android发送邮件,并弹出邮箱类应用供选择
  9. 图片循环滑动
  10. android dialog宽度无法填满屏幕解决方案