Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: SQALE limitation
Wiki Markup
Your browser does not support iframes.
titleLive example

If you want to see a live example of the capabilities of the Android plugin, you can have a look at the analysis of the <TODO> project on Nemo.

Description / Features

This plugin enhances the Java EcosystemPlugin to analyze Android projects within SonarQube:

  • Adds a new set of set of rules based on Android lint
  • On top of Java files, Android Manifest and resources (such as layouts or pictures) are analyzed

It is compatible with the the SonarQube Eclipse plugin to track issues while coding. It is also compatible with the Issues Report plugin to run pre-commit local analysis.


The Android SDK must be installed on the machine(s) running the SonarQube analyses. The ANDROID_HOME environment variable should be configured to point to the installation directory of the Android SDK.

Note that you have to install the different Patforms/API whose that your projects are built with.


  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQube server


The SonarQube Runner, Maven or Ant can be used to run analysis on Android projects.

Sample projects are

Include Page
Include - Plugin Installation
Include - Plugin Installation


Run an Analysis with the SonarQube Runner (Recommended method)

To run an analysis of your Android project, use the SonarQube Runner.

A sample project is available on GitHub that can be browsed or downloaded:




Run an Analysis with the other Analyzers

Maven and Ant can also be used to launch analysis on Android projects.

Code Coverage

To display code coverage data:

  1. Prior to the SonarQube analysis, execute your unit tests and generate the Emma 2.0 reports (.em and .ec files)
  2. Import these reports while running the SonarQube analysis by setting the property to the path of the directory containing the Emma reports. The path may be absolute or relative to the project base directory for standard projects, relative to the module base directory for multi-module projects.


See Metrics documentation page.


See Extending Coding Rules for Java.


As the SQALE model for Java is already provided by the Java Ecosystem, the SQALE model for Android has to be applied manually:

  1. Download the XML file containing the SQALE model
  2. Log in as a System administrator
  3. Go to Settings > SQALE > Import/Export > Merge model
  4. Upload the XML file
  5. Click on "Merge selected files"

Change Log

JIRA IssuesanonymoustruetitleVersion 0.1height60renderModestaticwidth900columnstype;key;summary;priorityurl, it is not possible to use SQALE with Android projects. This feature will be available in the next Android plugin version.
See the corresponding issue.