Posted on Leave a comment

Dagger test, androidTest component generated code

to allow Dagger to generate code in test and androidTest folders we should add dependencies test and androidTest to gradle.

Dagger test component not found

Espresso Dagger

Dagger not generating components for /test class

if we use apt

// for androidTest
androidTestApt '<version>'

// for unit test
testApt '<version>'

if we use annotationProcessor

androidTestAnnotationProcessor '<version>'
testAnnotationProcessor '<version>'
Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.