I had my project working perfectly with Butterknife to do an injection scan. But then I needed to add Dagger for dependency injection.
I have added the Gradle Annotation Processing Tool with the appropriate dagger requirement (only show the modified parts for brevity);
buildScript { repositories { maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { ... classpath 'com.jimdo.gradle:gradle-apt-plugin:0.2-SNAPSHOT' } } apply plugin: 'apt' dependencies { apt "com.squareup.dagger:dagger-compiler:${daggerVersion}" ... }
At this point, when I create and run the application, the properties marked with the @InjectView annotation @InjectView not receive injections of the following debug messages issued by Butterknife;
D/ButterKnife﹕ Looking up view injector for com.example.MainActivity D/ButterKnife﹕ Not found. Trying superclass com.example.FactListAbstractActivity D/ButterKnife﹕ Not found. Trying superclass android.app.Activity
android android-studio android-gradle dagger
marcus.ramsden
source share