apply plugin: 'com.androID.application'apply plugin: 'jacoco'...jacoco { toolVersion = "0.7.1.201405082137"}...androID { buildTypes { release { } deBUG { testCoverageEnabled true } }}
当我运行gradlew -i createDeBUGCoverageReport时,我得到一个覆盖率报告,但它是空的. gradle执行结束如下:
:androIDTest:connectedAndroIDTest (Thread[main,5,main]) completed. Took 2 mins 36.951 secs.:androIDTest:createDeBUGCoverageReport (Thread[main,main]) started.:androIDTest:createDeBUGCoverageReportExecuting task ':androIDTest:createDeBUGCoverageReport' (up-to-date check took 0.006 secs) due to: Output file /home/akos/src/androIDTest/build/outputs/reports/coverage/deBUG has changed. Output file /home/akos/src/androIDTest/build/outputs/reports/coverage/deBUG/index.HTML has been removed. Output file /home/akos/src/androIDTest/build/outputs/reports/coverage/deBUG/.resources/package.gif has been removed.[ant:reportWithJacoco] Loading execution data file /home/akos/src/androIDTest/build/outputs/code-coverage/connected/coverage.ec[ant:reportWithJacoco] Writing bundle 'deBUG' with 3 classes:androIDTest:createDeBUGCoverageReport (Thread[main,main]) completed. Took 0.215 secs.BUILD SUCCESSFulTotal time: 4 mins 53.467 secs
实际上,上面引用的coverage.ec文件为空(长度为0)
在目录build / intermediates / coverage-instrumented-classes /中,我似乎有了已检测的类文件
这是gradle 2.1
我究竟做错了什么?
解决方法 尝试使用Nexus设备(5或5x)生成调试覆盖率报告,它将完美运行.我遇到了与三星设备相同的问题(coverage.ec是空的),但之后我用Nexus 5x运行它,一切正常. 总结以上是内存溢出为你收集整理的android jacoco覆盖空与gradle全部内容,希望文章能够帮你解决android jacoco覆盖空与gradle所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)