I've recently tried the new Jacoco code coverage feature for Android Gradle plugin, and unfortunately it makes my tests fail with the following error:
java.lang.VerifyError: com/foo/bar/rest/SomeClass at
com.foo.bar.test.rest.BaseTest.setUp(BaseTest.java:87) at
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190) at
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175) at
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)
I enabled the code coverage using these lines in build.gradle:
buildTypes {
debug {
testCoverageEnabled = true
}
...
Has anyone encountered the same problem?