title: Dagger 2, supertypeInjector is null
body: <p>I'm trying to implement DI using Dagger 2. I use this <a href="http://frogermcs.github.io/dependency-injection-with-dagger-2-custom-scopes/" rel="nofollow">article</a> as example, but I get <code>NullPointerException</code> in generated class.</p>
  
  <p>Here's my stack trace:</p>
  
  <pre><code>E/AndroidRuntime:  Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void dagger.MembersInjector.injectMembers(java.lang.Object)' on a null object reference
  E/AndroidRuntime:     at me.cullycross.moody.activities.AuthActivity_MembersInjector.injectMembers(AuthActivity_MembersInjector.java:29)
  E/AndroidRuntime:     at me.cullycross.moody.activities.AuthActivity_MembersInjector.injectMembers(AuthActivity_MembersInjector.java:9)
  E/AndroidRuntime:     at me.cullycross.moody.di.components.DaggerAppComponent$LogInComponentImpl.inject(DaggerAppComponent.java:186)
  E/AndroidRuntime:     at me.cullycross.moody.activities.AuthActivity.inject(AuthActivity.java:59)
  E/AndroidRuntime:     at me.cullycross.moody.activities.AbstractRestClientActivity.onCreate(AbstractRestClientActivity.java:21)
  E/AndroidRuntime:     at me.cullycross.moody.activities.AuthActivity.onCreate(AuthActivity.java:50)
  </code></pre>
  
  <p>AbstractRestClientActivity.java:</p>
  
  <pre><code>public abstract class AbstractRestClientActivity extends RxAppCompatActivity {
  
    @Inject protected RestClient.ApiService mApiService; // if I comment or delete this line everything works like a charm
  
    @Override protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      inject();
    }
  
    protected abstract void inject();
  }
  </code></pre>
  
  <p>AuthActivity.java (I deleted util methods, onclick listeners etc):</p>
  
  <pre><code>public class AuthActivity extends AbstractRestClientActivity {
  
    @Inject TokenUtils mTokenUtils;
    @Inject CallbackManager mCallbackManager; // it's about facebook
  
    @Override protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_auth);
    }
  
    @Override protected void inject() {
      MoodyApplication.getApp(this).getAppComponent().logInComponent(new LogInModule()).inject(this);
    }
  }
  </code></pre>
  
  <p>MoodyApplication.java: </p>
  
  <pre><code>public class MoodyApplication extends Application {
  
    private AppComponent mAppComponent;
  
    public static MoodyApplication getApp(Context context) {
      return (MoodyApplication) context.getApplicationContext();
    }
  
    @Override public void onCreate() {
      super.onCreate();
      initAppComponent();
    }
  
    private void initAppComponent() {
      mAppComponent = DaggerAppComponent.builder()
          .networkModule(new NetworkModule())
          .utilModule(new UtilModule())
          .build();
    }
  
    public AppComponent getAppComponent() {
      return mAppComponent;
    }
  }
  </code></pre>
  
  <p>AppComponent.java:</p>
  
  <pre><code>@Singleton @Component(modules = { UtilModule.class, NetworkModule.class })
  public interface AppComponent {
    LogInComponent logInComponent(LogInModule logInModule);
    void inject(AbstractRestClientActivity activity);
  }
  </code></pre>
  
  <p>LogInComponent.java:</p>
  
  <pre><code>@ActivityScope @Subcomponent(modules = { LogInModule.class }) public interface LogInComponent {
    void inject(AuthActivity activity);
  }
  </code></pre>
  
  <p>UtilModule.java:</p>
  
  <pre><code>@Module public class UtilModule {
    @Provides @Singleton @Named("expose") Gson provideExposeGson() {
      return new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
          .excludeFieldsWithoutExposeAnnotation()
          .create();
    }
  
    @Provides @Singleton TokenUtils provideTokenUtils() {
      return new TokenUtils();
    }
  }
  </code></pre>
  
  <p>NetworkModule.java:</p>
  
  <pre><code>@Module public class NetworkModule {
    @Provides @Singleton RestClient provideRestClient(@Named("expose") Gson gson) {
      return new RestClient(gson);
    }
  
    @Provides @Singleton RestClient.ApiService provideApiService(RestClient client) {
      return client.getApiService();
    }
  }
  </code></pre>
  
  <p>LogInModule.java:</p>
  
  <pre><code>@Module public class LogInModule {
    @Provides @ActivityScope CallbackManager provideCallbackManager() {
      return CallbackManager.Factory.create();
    }
  }
  </code></pre>
  
  <p>Here is generated method in generated class <code>AuthActivity_MembersInjector</code>, which provokes NPE:</p>
  
  <pre><code>  @Override
    public void injectMembers(AuthActivity instance) {  
      if (instance == null) {
        throw new NullPointerException("Cannot inject members into a null reference");
      }
      supertypeInjector.injectMembers(instance); // here is NPE, supertypeInjector is null
      instance.mTokenUtils = mTokenUtilsProvider.get();
      instance.mCallbackManager = mCallbackManagerProvider.get();
    }
  </code></pre>
  
  <p>Any help would be very much appreciated.</p>