Android: Jacoco plugin doesn't generate coverage for classes that begin with "R"

I’ve been using the jacoco plugin to generate coverage reports for an Android project, and couldn’t get reporting for certain classes, even though they were being tested and executed.

At first I thought it was something to do with a class ID missmatch (

Then I discovered that this only happens when the class name starts with the letter “R”. If I rename any of the affected classes to start with any character other than “R”, I get normal coverage reporting. I have a feeling this is something to do with the jacoco plugin trying to avoid coverage reports on the Android R.class, which usually gets used extensively.

I have created a minimal test case and uploaded it to github ( Am I crazy in what I’m doing here? Are there any workarounds or configuration I’m not considering?

Ok, so this is actually a bug in the android platform code:

It’s been address and will be in a future release.