Jacoco exec file not generated (:jacocoTestReport SKIPPED)

I’m unable to get the .exec file generated when running code coverage on connectedAndroidTest. I’m able to get a code coverage report, even though the last thing that’s printed when I run ‘./gradlew jacocoTestReport’ (or ‘./gradlew connectedAndroidTest jacocoTestReport’) is:

‘’’ :dexAppDebugTest UP-TO-DATE :packageAppDebugTest UP-TO-DATE :assembleAppDebugTest UP-TO-DATE :connectedAndroidTestAppDebug :createAppNewDebugCoverageReport :createAppDebugCoverageReport :connectedAndroidTest UP-TO-DATE :jacocoTestReport SKIPPED


Total time: 1 mins 36.719 secs ‘’’

My gradle file for jacoco-related things looks like this:

apply plugin: 'jacoco'
  jacoco {
    toolVersion = ""
  def coverageSourceDirs = [
  task jacocoTestReport(type: JacocoReport, dependsOn: "connectedAndroidTest") {
    group = "Reporting"
    description = "Generates Jacoco coverage reports"
      reports {
        xml.enabled = true
        html.enabled = true
      classDirectories = fileTree(
            dir: 'build/intermediates/classes',
            excludes: ['**/R.class',
      sourceDirectories = files(coverageSourceDirs)
    additionalSourceDirs = files(coverageSourceDirs)
    executionData = files('build/jacoco/connectedAndroidTest.exec')

An xml file and html file are generated in build/outputs/reports/coverage/app/debug, but the exec file is nowhere to be found (even when I try running ‘./gradlew build jacocoTestReport’). I need the exec file to publish the code coverage report on Jenkins.

For anyone facing the same problem, I was looking for an .exec file, but actually, .ec files are produced. I’m able to get the proper published report on Jenkins using the JaCoCo plugin with these fields:

Path to exec files:
Path to class directories:
Path to source directories:
    **/com/app/authentication/**/*, **/com/app/model/**/*, **/com/app/net/**/*, **/com/app/provider/**/*, **/com/app/service/**/*, **/com/app/text/**/*, **/com/app/util/**/*
    **/R.class, **/R$*.class, **/BuildConfig.*, **/Manifest*.*, **/*Activity*.*, **/*Fragment*.*

@linguine Could you please share your updated gradle file.

My gradle file is the same – the only changes I made were to the Jenkins job, using the fields I specified above. Unfortunately, I still don’t know how to get the report from the command line.