Error creating code coverage report for androidTest dashboards with dagger

I want to run the createDebugCoverageReport gradle task. But after completing the task, the execution and errors are below.

 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)

Below are the daggers used

 compile 'com.google.dagger:dagger:2.4'
 annotationProcessor 'com.google.dagger:dagger-compiler:2.4'
 androidTestCompile 'com.google.dagger:dagger-compiler:2.4'

Please suggest how I can remove this error.

0
source share
1 answer

due to what I found, this is a conflict with the extensions of dagger-producers - auto-value-gson works fine with dagger 2.0.2 - 2.4, but when daggers-producers (any version) are added as an additional dependency on the subsequent project exclusion is thrown .

, dex, . , apt, .

0

Source: https://habr.com/ru/post/1618232/


All Articles