Android Lint Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID android-lint Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
2.2 (archives)
Oct 08, 2014
maven-plugin (version:1.532, optional)
token-macro (version:1.5.1, optional)
dashboard-view (version:2.2, optional)
analysis-core (version:1.61)
Source Code
Issue Tracking
Pull Requests
Open Issues
Pull Requests
Christopher Orr (id: orrc)
Usage Installations 2014-May 1564
2014-Jun 1599
2014-Jul 1744
2014-Aug 1767
2014-Sep 1856
2014-Oct 1938
2014-Nov 1995
2014-Dec 1995
2015-Jan 2025
2015-Feb 2066
2015-Mar 2239
2015-Apr 2232

Parses output from the Android lint tool and displays the results for analysis.
See also: Android Emulator Plugin.


Android Lint is a tool which scans your Android projects and reports on potential bugs, performance, security and translation issues, plus more.

This Jenkins plugin parses XML reports produced by running lint, analyses them and displays the results for each build.
Information shown includes a build summary, trend graphs, display of warnings in context, and dashboard portlets.

This plugin builds on the work of the static analysis core plugin; see the Static Code Analysis Plug-ins page for a fuller list of features.



  • Jenkins 1.424 or newer
  • The Static Analysis Utilities plugin — this will be automatically installed when you install this plugin
  • Android SDK Tools r17 or newer, but at least r21 is recommended

If the Dashboard View plugin is also installed, you will be able to add Lint-specific portlets to your dashboard views.


Job configuration

Enable "Publish Android Lint results" in the "Post-build Actions" of your Jenkins job.

By default, the plugin will parse any files called "lint-results.xml", anywhere in your build's workspace.
This behaviour can be overridden by entering a filename or pattern, relative to the root of your build's workspace.

Producing Lint output

Note that this plugin does not run Lint for you — you must provide Lint results in XML format, either by running lint during a build, or by copying the file(s) from somewhere else.

Via Gradle

If you're using the Gradle build system for Android, as of version 0.7 of the Android Gradle plugin, Lint integration is built-in.

By default, running the lint Gradle task will generate the Lint XML file required by this plugin.
However, you should disable the abortOnError option, to ensure that the Gradle script reports success, even if Lint finds issues with your project that it regards fatal.

You can do this by adding a lintOptions block at the end of your android block in your build.gradle file:

android {
    // ...

    lintOptions {
        // Don't abort if Lint finds an error, otherwise the Jenkins build
        // will be marked as failed, and Jenkins won't analyse the Lint output
        abortOnError false

Running ./gradlew lint will compile your Android project, run Lint, and write the results to build/lint-results.xml.
As mentioned in the section above, this plugin will automatically find and parse any files with this name.

If you run ./gradlew lintDebug, the file will be called lint-results-debug.xml — and the same pattern applies for other build variants (i.e. the lintRelease task creates lint-results-release.xml).
In these cases, make sure you enter a filename pattern like **/lint-results*.xml so that Jenkins can pick up the Lint results.

Via the command line

If you're not using Gradle or some other build tool which automates the execution of Lint, you will need to add an "Execute shell" build step to your Jenkins job where you run lint.

For best results, run Lint in your Android application's directory, e.g.:
cd app; lint --xml --fullpath lint-results.xml .

Note: When running Jenkins on a headless system, or under a user ID which doesn't have access to a graphical environment, you may see some errors while running Lint.
To combat this, you can run Java in headless mode, as follows:
os_opts="-Djava.awt.headless=true" lint --xml --fullpath lint-results.xml .

Changing build outcome based on Lint results

You can mark builds as unstable or failed, if the number of Lint issues found — or introduced in the latest build — exceeds a certain threshold.

e.g. A build can be automatically flagged as unstable or failed if any Lint issues with "Fatal" or "Error" severity are introduced.

To do this, in the job configuration, click "Advanced" in the "Publish Android Lint results" section. Under "Status thresholds" you can change the build to unstable (yellow ball) or failed (red ball). To mark a build as unstable if there are more than 10 Lint issues in total, but fail the build outright if even a single "Fatal"/"Error" issue exists, then enter "10" under "All priorities" in the yellow row, and "0" under "Priority high" in the red row.

i.e. If there are 12 normal-priority Lint issues found, this exceeds the threshold of 10, causing the build to be marked as unstable. Or, if there is a high-priority issue found, that would exceed the threshold of 0, thereby failing the build.

You should use this to be ruthless about fixing Lint issues as they occur, and remember that you can exclude false positives by setting up a lint.xml file in the root of your app project.

Version history

Version 2.2 (October 9, 2014)

  • Added a new view column, showing the total Lint warnings count (issue #22176)
  • Upgraded analysis-core to the latest version, 1.61
    • This fixes incorrect issue counts where Lint files contain duplicate issues
  • Fixed wrongly-escaped XML tags
    • Thanks to Sebastian Schuberth for these fixes and features

Version 2.1 (April 11, 2013)

  • Maven jobs are now supported, via the 'lint' goal used by the Android Maven Plugin 3.5.1+ (see issue #14857)
  • Fixed issue where the Android icon wasn't displayed in Jenkins 1.501+ (see issue #16075)
  • HTML-like tags (e.g. <TextView>) are no longer missing from issue explanations
  • Upgraded to the latest static analysis plugins, raising the minimum Jenkins version to 1.424

Version 2.0.3 (February 12, 2013)

  • Fixed issue where issues with "Informational" severity were being shown as "Warning" (see issue #16645)
  • Fixed issue where some configuration settings weren't being honoured correctly

Version 2.0.2 (December 30, 2012)

  • Fixed issue where the Android icon wasn't always displayed (see issue #16075)

Version 2.0.1 (November 13, 2012)

  • Issues are now classified correctly, according to Lint 'severity' rather than 'priority'
    • Lint issues with severity "Fatal" or "Error" are now shown as high priority, "Warning" has normal priority, "Informational" has low priority
  • Full explanations and context information for all issues are now included, when using SDK Tools r21 or above
  • Explanations for new Lint checks introduced in the future will appear without having to upgrade this plugin
  • Removed support for Maven job types, as this doesn't work
  • Many thanks to Tor Norbye for updating Lint to make this possible!

Version 1.0.1 (March 22, 2012)

  • Fixed bug where gathering results would fail for builds running on a slave, with Lint XML generated using SDK Tools r17

Version 1.0 (March 21, 2012)

  • Initial release
  • Thanks to Ulli Hafner for writing analysis-core and providing for code samples from his many other static analysis plugins


supports-dashboard-view supports-dashboard-view Delete
plugin-report plugin-report Delete
plugin-android plugin-android Delete
plugin-listview-column plugin-listview-column Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 07, 2012

    Simon Wiest says:

    Jenkins and the Android Lint plugin had a nice appearance in this year's Google ...

    Jenkins and the Android Lint plugin had a nice appearance in this year's Google I/O 2012 talk "What's New in Android Developers' Tools" (see

  2. Aug 09, 2012

    Anton Weiss says:

    Thanks a lot - this is a great plugin. Is it possible to add Lint analysis summ...

    Thanks a lot - this is a great plugin.

    Is it possible to add Lint analysis summary to the mail notification?

  3. Dec 09, 2012

    David Müller says:

    The plugin is disabled for maven builds, it would be useful to document this her...

    The plugin is disabled for maven builds, it would be useful to document this here (JENKINS-14857).

    A workaround for maven users could be (you could also call it a hack ;-):

    Define a Freestyle project as a downstream project in Jenkins, accessing the workspace of the maven project directly.

  4. Dec 12, 2012

    Paul Blundell says:

    Can you add the Continuous Integration Game as an optional dependency ...

    Can you add the Continuous Integration Game as an optional dependency to the Lint plugin? Then we can get a score when people add/remove lint errors.

    From the CI Game wiki:


    Including rules in another plugin

    You are a maintainer of a plugin and would like to add rules to the game with data from your plugin. To do this you should declare the game plugin as an optional dependency to your plugin. To create rules implement the interface Rule, and group them together in a RuleSet. To add a RuleSet to the game, add it to the game's RuleBook.hudson.plugins.cigame.PluginImpl.GAME_PUBLISHER_DESCRIPTOR.getRuleBook().addRuleSet(pluginruleset);

    If there are already rules for your plugin in the game plugin, let me know so they can be removed from the plugin.


    1. Jan 29, 2013

      Christopher Orr says:

      I've added this as JENKINS-16515.

      I've added this as JENKINS-16515.