title: Context cannot be provided without an @Provides-annotated method, but it is?
body: <p>I have the following simple module:</p>
  
  <pre><code>@Module
  public class ApplicationModule {
  
      private CustomApplication customApplication;
  
      public ApplicationModule(CustomApplication customApplication) {
          this.customApplication = customApplication;
      }
  
      @Provides @Singleton CustomApplication provideCustomApplication() {
          return this.customApplication;
      }
  
      @Provides @Singleton @ForApplication Context provideApplicationContext() {
          return this.customApplication;
      }
  
  }
  </code></pre>
  
  <p>And the respective simple component: </p>
  
  <pre><code>@Singleton
  @Component(
          modules = ApplicationModule.class
  )
  public interface ApplicationComponent {
  
      CustomApplication getCustomApplication();
  
      Context getApplicationContext();
  
  }
  </code></pre>
  
  <p>And I'm creating the component here:</p>
  
  <pre><code>public class CustomApplication extends Application {
  
      ...
  
      private ApplicationComponent component;
  
      @Override
      protected void attachBaseContext(Context base) {
          super.attachBaseContext(base);
          MultiDex.install(this);
      }
  
      @Override
      public void onCreate() {
          super.onCreate();
  
          component = DaggerApplicationComponent.builder()
                  .applicationModule(new ApplicationModule(this))
                  .build();
  </code></pre>
  
  <p>It throws this error at compile time: <code>Error:(22, 13) error: android.content.Context cannot be provided without an @Provides-annotated method</code>, but as you can see it is annotated with <code>@Provides</code>.</p>
  
  <p>It's really strange because the problem goes away when I take the qualifier annotation off.</p>
  
  <p>Just in case, this is my <code>@ForApplication</code> qualifier:</p>
  
  <pre><code>@Qualifier @Retention(RUNTIME)
  public @interface ForApplication {
  }
  </code></pre>
  
  <p>This is practically a textbook Dagger2 example. What am I doing wrong?</p>