package it.cosenonjaviste.daggermock.realworldapp;

import dagger.Binds;
import dagger.Module;
import dagger.android.AndroidInjector;
import dagger.multibindings.ClassKey;
import dagger.multibindings.IntoMap;
import it.cosenonjaviste.daggermock.realworldapp.main.MainActivity;
import it.cosenonjaviste.daggermock.realworldapp.main.MainActivityComponent;

@Module(subcomponents = {
        MainActivityComponent.class
})
abstract public class MainActivityBindingModule {

    @Binds
    @IntoMap
    @ClassKey(MainActivity.class)
    abstract AndroidInjector.Factory<?> mainActivityInjectorFactory(
            MainActivityComponent.Builder builder);
}

package it.cosenonjaviste.daggermock.realworldapp;

import android.app.Activity;

import dagger.Binds;
import dagger.Module;
import dagger.android.ActivityKey;
import dagger.android.AndroidInjector;
import dagger.multibindings.IntoMap;
import it.cosenonjaviste.daggermock.realworldapp.main.MainActivity;
import it.cosenonjaviste.daggermock.realworldapp.main.MainActivityComponent;

@Module(subcomponents = {
        MainActivityComponent.class
})
abstract public class MainActivityBindingModule {

    @Binds
    @IntoMap
    @ActivityKey(MainActivity.class)
    abstract AndroidInjector.Factory<? extends Activity> mainActivityInjectorFactory(
            MainActivityComponent.Builder builder);
}

--- 
+++ 
@@ -1,11 +1,9 @@
 package it.cosenonjaviste.daggermock.realworldapp;
-
-import android.app.Activity;
 
 import dagger.Binds;
 import dagger.Module;
-import dagger.android.ActivityKey;
 import dagger.android.AndroidInjector;
+import dagger.multibindings.ClassKey;
 import dagger.multibindings.IntoMap;
 import it.cosenonjaviste.daggermock.realworldapp.main.MainActivity;
 import it.cosenonjaviste.daggermock.realworldapp.main.MainActivityComponent;
@@ -17,7 +15,7 @@
 
     @Binds
     @IntoMap
-    @ActivityKey(MainActivity.class)
-    abstract AndroidInjector.Factory<? extends Activity> mainActivityInjectorFactory(
+    @ClassKey(MainActivity.class)
+    abstract AndroidInjector.Factory<?> mainActivityInjectorFactory(
             MainActivityComponent.Builder builder);
 }
Fix compilation error in RealWorldAppInjector
