Gradle task :app:createDebugAndroidTestCoverageReport fails, why?

1.8k Views Asked by At

When I run gradlew createDebugCoverageReport it fails with:

Task :app:connectedDebugAndroidTest Starting 1 tests on Tablet_Sv2(AVD) - 12

Test results saved as file:/../app/build/outputs/androidTest-results/connected/flavors/app/Tablet_Sv2(AVD)%20-%2012/test-result.pb. Inspect these results in Android Studio by selecting Run > Import Tests From File from the menu bar and importing test- result.pb.

Task :app:createDebugAndroidTestCoverageReport FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:createDebugAndroidTestCoverageReport'.

A failure occurred while executing com.android.build.gradle.internal.coverage.JacocoReportTask$JacocoReportWorkerAction Unable to generate Jacoco report

Why?

EDIT: According to this Answer the app level build.gradle would require

configurations.all{
resolutionStrategy {
    eachDependency { details ->
        if ('org.jacoco' == details.requested.group) {
            details.useVersion "0.8.7"
        }
    }
   }
}
0

There are 0 best solutions below