We’re trying to generate a Jacoco test report for our Android project to see the coverage results in Sonarqube. When I try to sync our code, we will receive the following error. We need an XML report for new version of Sonarqube, instead of exec file.
Our gradle version is 6.2.2, JaCoCo version is 0.8.6. Why are we receiving this error and how can we fix it?
Could not find method jacocoTestReport() for arguments [jacoco_1wfi6bvxampfsufxvx6i8m2kv$_run_closure2@35f46348] on project ‘:app’ of type org.gradle.api.Project.
Our module build.gradle file contains the following items:
Eventhough I replace destination with a File like xml.destination file("${buildDir}/jacoco/jacocoTestReport.xml") , I got the same error.
“Could not find method jacocoTestReport() for arguments [jacoco_1wfi6bvxampfsufxvx6i8m2kv$_run_closure3@7fc32723] on project ‘:app’ of type org.gradle.api.Project.”