title: Dagger 2 error: dependency "cannot be provided without an @Inject constructor" while it actually annotated with @Inject
body: <p>I've started using Dagger 2 and faced strange issue that looks like a bug to me.</p>
  
  <p>I have 3 modules, that are composed into one subcomponent, which in turn extends/pluses higher level component.</p>
  
  <p>Subcomponent is pretty simple: just combination of modules and a single injection point:</p>
  
  <pre><code>@Singleton
  @Subcomponent(
          modules = {
                  NavigationDrawerModule.class,
                  NavigationListModule.class,
                  SwitcherModule.class
          }
  )
  public interface NavigationDrawerComponent {
  
  
      NavigationDrawerFragment inject(NavigationDrawerFragment object);
  
  }
  </code></pre>
  
  <p>First modules looks like this - it provides general fragment-level dependencies:</p>
  
  <pre><code>@Module
  public class NavigationDrawerModule {
  
      private final Activity activity;
      private final View rootView;
      private final LoaderManager loaderManager;
  
      public NavigationDrawerModule(Activity activity, View rootView, LoaderManager loaderManager) {
          this.activity = activity;
          this.rootView = rootView;
          this.loaderManager = loaderManager;
      }
  
      @Provides @Singleton EventBus provideLocalBus() {
          return EventBus.builder().build();
      }
  
      @Provides @Singleton View provideViewRoot() {
          return rootView;
      }
  
      @Provides @Singleton LoaderManager provideLoaderManager() {
          return loaderManager;
      }
  
      @Provides @Singleton Context provideContext() {
          return activity;
      }
  }
  </code></pre>
  
  <p>Second module looks like this - it provides presenter/controller and their dependencies for a subset of UI on screen: </p>
  
  <pre><code>@Module
  public class SwitcherModule {
  
      @Provides SwitchController provideSwitcherController(SwitchControllerImpl impl) {
          return impl;
      }
  
      @Provides SwitcherView provideSwitcherView(SwitcherViewImpl impl) {
          return impl;
      }
  
  }
  </code></pre>
  
  <p>Third module - another presenter/controller for a subset of UI:</p>
  
  <pre><code>@Module
  public class NavigationListModule {
  
      @Provides @Singleton NavigationListController provideNavigationListController(NavigationListControllerImpl impl) {
          return impl;
      }
  
      @Provides @Singleton NavigationListView provideNavigationListView(NavigationListViewImpl impl) {
          return impl;
      }
  }
  </code></pre>
  
  <p>Relevant part of the fragment that is being injected:</p>
  
  <pre><code>@Inject SwitchController identitySwitchController;
  @Inject SwitcherView identitySwitcherView;
  @Inject NavigationListController navigationListController;
  @Inject NavigationListView navigationListView;
  </code></pre>
  
  <p><code>NavigationListControllerImpl</code> implements the following constructor:</p>
  
  <pre><code>@Inject
  public NavigationListControllerImpl(Context ctx, EventBus bus) {
      this.ctx = ctx;
      this.bus = bus;
  }
  </code></pre>
  
  <p>Error I'm getting from the Dagger 2 compiler is the following:</p>
  
  <pre><code>error: ...sidenavigation.navigationlist.NavigationListControllerImpl cannot be provided without an @Inject constructor or from an @Provides-annotated method.
  ...sidenavigation.NavigationDrawerFragment.navigationListController
  [injected field of type: ...sidenavigation.navigationlist.NavigationListController navigationListController]
  ...sidenavigation.navigationlist.NavigationListModule.provideNavigationListController(...sidenavigation.navigationlist.NavigationListControllerImpl impl)
  [parameter: ...sidenavigation.navigationlist.NavigationListControllerImpl impl]
  </code></pre>
  
  <p>Error complains about missing @Inject-annotated constructor, but it exists! If I replace implicit NavigationListControllerImpl instance creation (passing via <code>@Provides</code>-method parameter) with explicit (with <code>new</code>), dagger starts complaining about the same error but now for the presenter object which is the second entry in the same module, and so on.</p>
  
  <p>All this situation looks very strange, and I'd like to hear some input from more experienced Dagger 2 users (and developers?).</p>
  
  <p>Thank you in advance!</p>