title: Dagger2 where inject @Named @Provides in dependent module?
body: <p>I use dagger2 demo by <a href="https://guides.codepath.com/android/Dependency-Injection-with-Dagger-2" rel="noreferrer">https://guides.codepath.com/android/Dependency-Injection-with-Dagger-2</a>.
  I want to use cached and non_cached retrofit call. I create in NetModule.java</p>
  
  <pre><code>@Provides @Named("cached")
  @Singleton
  OkHttpClient provideOkHttpClient(Cache cache) {
      OkHttpClient okHttpClient = new OkHttpClient.Builder()
              .cache(cache)
              .build();
      return okHttpClient;
  }
  
  @Provides @Named("non_cached")
  @Singleton
  OkHttpClient provideOkHttpClientNonCached() {
      OkHttpClient okHttpClient = new OkHttpClient.Builder()
              .build();
      return okHttpClient;
  }
  </code></pre>
  
  <p>GitHubModule.java is dependent on NetModule.java. 
  my GitHubComponent.java</p>
  
  <pre><code>@UserScope
  @Component(dependencies = NetComponent.class, modules = GitHubModule.class)
  public interface GitHubComponent {
  void inject(DemoDaggerActivity activity);
  }
  </code></pre>
  
  <p>my NetComponent.java</p>
  
  <pre><code>@Singleton
  @Component(modules={ApplicationModule.class, NetModule.class})
  public interface NetComponent {
  // downstream components need these exposed
  Retrofit retrofit();
  OkHttpClient okHttpClient();
  SharedPreferences sharedPreferences();
  }
  </code></pre>
  
  <p>In my <code>DemoDaggerActivity.java</code> I inject retrofit:</p>
  
  <pre><code>@Inject @Named("cached")
  OkHttpClient mOkHttpClient;
  
  @Inject
  Retrofit mRetrofit;
  </code></pre>
  
  <p>After rebuild project I get error:</p>
  
  <p><a href="https://i.stack.imgur.com/jTWIa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jTWIa.png" alt="enter image description here"></a></p>
  
  <p>Where can I tell to dagger, that i want to use cached or non_cached retrofit?</p>