1. 问题
1.1 运行 jacocoTestReport
gradle jacocoTestReport
$ gradle jacocoTestReport
报如下错
* What went wrong:
Execution failed for task ':app:jacocoTestReport'.
> Unable to read execution data file E:\app\build\outputs\code-coverage\connected\coverage.ec2.解决
将build.gradle
jacoco {
改为
toolVersion = "0.7.9"
}
jacoco {
toolVersion = "0.7.4+"
}
再运行gradle jacocoTestReport 报告成功生成