For instrumented tests, I have a TestApplication
that creates a TestComponent
, but the file is not generated anymore (Error:/xxx/TestApplication.java:16: The import.xxx.DaggerTestApplicationComponent cannot be resolved
). I'm not able to identify the root cause. I've tried different Android Studio (2.2, 2.1.2), different gradle plugin (2.2.0-alpha6, 5, 4) and different versions of dagger (2.2 to 2.6).
Should I use androidTestAnnotationProcessor
? (that was not the case before)
edit: to use dagger 2.6, need to add classpath 'com.google.guava:guava:19.0'
update: there was a problem with a Module
, hence the Component
couldn't be create. However, using jack (even with debug options), I couldn't see the problem. For now, reverting to java 7, gradle plugin 2.1.2. That way, no need to specify which guava version, and all the latest libs can be used (dagger 2.6, butterknife 8.2.1, apt 1.8)