Jacoco and Unit Tests Code Coverage with android-gradle-plugin >= 1.1

后端 未结 9 852

I recently started integrating android-gradle-plugin 1.1.0 in one of my projects. The project uses robolectric 2.4 to run unit tests.

It\'s

9条回答
  •  天涯浪人
    2020-12-12 21:19

    I was facing exactly the same problem like you. Today I did completely removed android studio, android sdk, gradle. Then reinstall everything. After that, I just added inside the app build.gradle.

    debug { testCoverageEnabled true } Then I run ./gradlew connectedChec. Everything is working perfectly. Android studio default Jacoco working fine for me. I think it is also possible to create a jacocoTestReport Task and then create code coverage.I don't know why gradle and android studio was not working previously.

提交回复
热议问题