Hello, I have recently started experimenting with enabling testCodeCoverage for my Android application. I have come across the same issue, but I am attempting to narrow down what is causing this. I found out that when I add "testCodeCoverage=true" to my app's Gradle build script, I am able to create Jacoco test coverage reports just fine using the Gradle task "createDebugCoverageReport".
However, when I add a module (an IML module as I am using Android Studio) to the project and want to create coverage reports only for that module, the app crashes upon start as the agent did not get packaged with the application. This seems to be a bug in either the Android Gradle plugin or the Jacoco Gradle plugin. I have created a sample Android app in a public Github repo that will immediately crash: https://github.com/ronaldw/AndroidCodeCoverageInModuleIssue. The project description contains some more detailed explanation. As this seems to be the same or a related issue, I was wondering what the status of the issue is or whether the behavior described above is intentional. Thanks! - Ronald Wolvers -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/3d471e44-1703-4d9e-aa07-b023ab665c37%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
