Dagger dependencies when overriding graph with mock module causes NoClassDefFoundError
问题 I am am migrating project to dagger 1.2.2. I'd like to override some dependencies for functional tests. For that I included the dagger-compiler as a dependency of the androidTest-build(?) as well: apt "com.squareup.dagger:dagger-compiler:$daggerVersion" compile "com.squareup.dagger:dagger:$daggerVersion" androidTestApt "com.squareup.dagger:dagger-compiler:$daggerVersion Now the compiler complains that he cannot find a class (I guess because both builds now contain the transitive dependencies