title: No inject registered. You must explicitly add it to the 'injects' option in one of your modules
body: <p>Hi I'm new to dagger and trying to study it with simple android app.</p>
  
  <p>I'm getting error from the title even if there is module that injects this view. Could anyone help me figure out why it does not inject view ?</p>
  
  <p>Here is my main module for app:</p>
  
  <pre><code>@dagger.Module(injects = {App.class, MainActivity.class}, complete = false)
  public class AppModule {
      private final App app;
      public AppModule(App app) { this.app = app; }
      @Provides @Singleton public App provideApp() { return app; }
  }
  </code></pre>
  
  <p>another module that injects my view:</p>
  
  <pre><code>@Layout(R.layout.sidemenu)
  public class SidemenuScreen implements Blueprint{
      @Override public String getMortarScopeName() { return getClass().getName(); }
      @Override public Object getDaggerModule() { return new Module();}
  
      @dagger.Module(injects= SidemenuView.class, addsTo = AppModule.class)
      public static class Module { 
         public Module() {}
      }
  
      @Singleton public static class Presenter extends ViewPresenter&lt;SidemenuView&gt; {
          @Inject Presenter() {}
          @Override protected void onLoad(Bundle savedInstanceState) {super.onLoad(savedInstanceState); }
          @Override protected void onSave(Bundle outState) { super.onSave(outState); }
      }
  }
  </code></pre>
  
  <p>As you can see <code>SidemenuScreen.Module</code> injects <code>SidemenuView</code> and addsTo <code>AppModule</code>. Am I wrong ?</p>
  
  <p>ObjectGraph is created like this in <code>onCreate()</code> method of my Application class :</p>
  
  <pre><code>    ObjectGraph objectGraph = ObjectGraph.create(new AppModule(this));
      objectGraph.inject(this);
      rootScope = Mortar.createRootScope(BuildConfig.DEBUG, objectGraph);
  </code></pre>
  
  <p>view that should be injected</p>
  
  <pre><code>public class SidemenuView extends LinearLayout {
      @Inject SidemenuScreen.Presenter presenter;
  
      public SidemenuView(Context context) {this(context, null); }
      public SidemenuView(Context context, AttributeSet attrs) { this(context, attrs, 0); }
      public SidemenuView(Context context, AttributeSet attrs, int defStyle) {
          super(context, attrs, defStyle);
          Mortar.inject(context, this);
      }
  }
  </code></pre>
  
  <p>and activity that uses all this stuff:</p>
  
  <pre><code>public class MainActivity extends Activity {
      private MortarActivityScope activityScope;
      @Inject App app;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.activity_main);
  
          Blueprint screen = getScreenFromIntent(getIntent());
  
          if (screen != null) {
              MortarScope parentScope = Mortar.getScope(getApplication());
              activityScope = Mortar.requireActivityScope(parentScope, screen);
              activityScope.onCreate(savedInstanceState);
  
              Mortar.inject(this, this);
          }
  
          SlidingMenu menu = new SlidingMenu(this);
          menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
          menu.setMenu(R.layout.sidemenu);
      }
  }
  </code></pre>
  
  <p>Here used <a href="https://github.com/jfeinstein10/SlidingMenu" rel="noreferrer">this</a> Sliding menu lib:</p>
  
  <p>So when <code>menu.setMenu(R.layout.sidemenu);</code> called it inflates view and <code>Mortar.inject(context, this);</code> is called from the <code>SidemenuView</code> constructor where error occurs.</p>
  
  <p>Here is backstack:</p>
  
  <pre><code> java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.dagger/com.example.dagger.ui.MainActivity}: android.view.InflateException: Binary XML file line #3: Error inflating class com.example.dagger.ui.sidemenu.SidemenuView
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
              at android.app.ActivityThread.access$900(ActivityThread.java:161)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:157)
              at android.app.ActivityThread.main(ActivityThread.java:5356)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: android.view.InflateException: Binary XML file line #3: Error inflating class com.example.dagger.ui.sidemenu.SidemenuView
              at android.view.LayoutInflater.createView(LayoutInflater.java:626)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:470)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
              at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.setMenu(SlidingMenu.java:375)
              at com.example.dagger.ui.MainActivity.setupSidemenu(MainActivity.java:93)
              at com.example.dagger.ui.MainActivity.onCreate(MainActivity.java:51)
              at android.app.Activity.performCreate(Activity.java:5426)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
              at android.app.ActivityThread.access$900(ActivityThread.java:161)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:157)
              at android.app.ActivityThread.main(ActivityThread.java:5356)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: java.lang.reflect.InvocationTargetException
              at java.lang.reflect.Constructor.constructNative(Native Method)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
              at android.view.LayoutInflater.createView(LayoutInflater.java:600)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:470)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
              at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.setMenu(SlidingMenu.java:375)
              at com.example.dagger.ui.MainActivity.setupSidemenu(MainActivity.java:93)
              at com.example.dagger.ui.MainActivity.onCreate(MainActivity.java:51)
              at android.app.Activity.performCreate(Activity.java:5426)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
              at android.app.ActivityThread.access$900(ActivityThread.java:161)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:157)
              at android.app.ActivityThread.main(ActivityThread.java:5356)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: java.lang.IllegalArgumentException: No inject registered for members/com.example.dagger.ui.sidemenu.SidemenuView. You must explicitly add it to the 'injects' option in one of your modules.
              at dagger.ObjectGraph$DaggerObjectGraph.getInjectableTypeBinding(ObjectGraph.java:302)
              at dagger.ObjectGraph$DaggerObjectGraph.inject(ObjectGraph.java:279)
              at mortar.Mortar.inject(Mortar.java:93)
              at com.example.dagger.ui.sidemenu.SidemenuView.&lt;init&gt;(SidemenuView.java:29)
              at com.example.dagger.ui.sidemenu.SidemenuView.&lt;init&gt;(SidemenuView.java:21)
              at java.lang.reflect.Constructor.constructNative(Native Method)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
              at android.view.LayoutInflater.createView(LayoutInflater.java:600)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:470)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
              at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.setMenu(SlidingMenu.java:375)
              at com.example.dagger.ui.MainActivity.setupSidemenu(MainActivity.java:93)
              at com.example.dagger.ui.MainActivity.onCreate(MainActivity.java:51)
              at android.app.Activity.performCreate(Activity.java:5426)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
              at android.app.ActivityThread.access$900(ActivityThread.java:161)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:157)
              at android.app.ActivityThread.main(ActivityThread.java:5356)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
  </code></pre>