Closed KaranbeerKaur closed 7 years ago
This isn't clear to me to be a dagger issue. Maybe try posting this on StackOverflow, which is better for questions
@ronshapiro But this error is related to dagger2.4
java.lang.NoClassDefFoundError: **dagger.shaded.auto.common.BasicAnnotationProcessor**
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at android.support.test.internal.runner.TestLoader.doLoadClass(TestLoader.java:92)
at android.support.test.internal.runner.TestLoader.loadIfTest(TestLoader.java:113)
at android.support.test.internal.runner.TestRequestBuilder.loadClassesFromClassPath(TestRequestBuilder.java:801)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:747)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:354)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:260)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1970)
What Ron means is that it's not a bug in Dagger itself, but rather has to do with how you're using it; so StackOverflow is a better place to seek for help in fixing your project.
@tbroyer I have already posted this on StackOverflow http://stackoverflow.com/questions/42714259/error-when-generating-code-coverage-report-for-androidtest-instrumented-testcase but didn't get any success. you have better idea on dagger, if you can suggest to solve issue with dagger.shaded.auto.common.BasicAnnotationProcessor. can please update coffee example having test cases in espresso and mockito and with "testCoverageEnabled true" giving code coverage for coffee example, so that we can refer that example and can cross check issue. It will be very helpful. thanks!
Previously I was using dagger 2.4 version and when I try to generate code coverage by running android gradle task createDebugCoverageReport at that time I was getting this([http://stackoverflow.com/questions/42714259/error-when-generating-code-coverage-report-for-androidtest-instrumented-testcase]) error.
Now I update dagger version to 2.10 and app is multi-dex application, But I am getting below error Error:Execution failed for task ``` ':app:transformClassesWithMultidexlistForDebugAndroidTest'.