title: Dagger 2 : error while getting a multiple instances of same object with @Named
body: <p>How can i get multiple instances of same return type like cursor </p>
  
  <p>for example :-</p>
  
  <pre><code>Module
  @CursorScope
  public class CursorModule {
  
  
      @Provides
      Cursor provideSongCursor(
              @Named("Song") Musician musician) {
          return musician.getApplicationContext().getContentResolver().query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
                  new String[]{
                          BaseColumns._ID,
                          MediaStore.Audio.AudioColumns.TITLE,
                          MediaStore.Audio.AudioColumns.ARTIST,
                          MediaStore.Audio.AudioColumns.ALBUM,
                          MediaStore.Audio.AudioColumns.DURATION
                  }, MediaStore.Audio.AudioColumns.IS_MUSIC + "=1", null, null);
      }
  
      @Provides
      Cursor provideAlbumCursor(
              @Named("Album") Musician musician) {
          return musician.getApplicationContext().getContentResolver().query(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI,
                  new String[]{
                          BaseColumns._ID,
                          MediaStore.Audio.AlbumColumns.ALBUM,
                          MediaStore.Audio.AlbumColumns.ARTIST,
                          MediaStore.Audio.AlbumColumns.NUMBER_OF_SONGS,
                          MediaStore.Audio.AlbumColumns.FIRST_YEAR
                  }, null, null, null);
      }
  
      @Provides
      Cursor provideArtistCursor(@Named("Artist") Musician musician) {
          return musician.getApplicationContext().getContentResolver().query(MediaStore.Audio.Artists.EXTERNAL_CONTENT_URI,
                  new String[] {
                          BaseColumns._ID,
                          MediaStore.Audio.ArtistColumns.ARTIST,
                          MediaStore.Audio.ArtistColumns.NUMBER_OF_ALBUMS,
                          MediaStore.Audio.ArtistColumns.NUMBER_OF_TRACKS
                  }, null, null,null);
      }
  
      @Provides
      Cursor provideGenreCursor(
              @Named("Genres") Musician musician) {
          return musician.getApplicationContext().getContentResolver().query(MediaStore.Audio.Genres.EXTERNAL_CONTENT_URI,
                  new String[] {
                          BaseColumns._ID,
                          MediaStore.Audio.GenresColumns.NAME
                  }, null, null, null);
      }
  
      @Provides
      Cursor providePlaylistCursor(@Named("Playlist") Musician musician) {
          return musician.getApplicationContext().getContentResolver().query(MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI,
                  new String[] {
                          BaseColumns._ID,
                          MediaStore.Audio.PlaylistsColumns.NAME
                  }, null, null, null);
      }
  }
  </code></pre>
  
  <p>which is provided in</p>
  
  <pre><code>@CursorScope
  @Subcomponent(modules = CursorModule.class)
  public interface CursorComponent {
      Cursor cursor();
  }
  </code></pre>
  
  <p>I get this error </p>
  
  <pre><code>Error:(17, 11) Gradle: error: android.database.Cursor is bound multiple times:
  @Provides android.database.Cursor com.merkmod.musician.dependency.CursorModule.provideSongCursor(@Named("Song") com.merkmod.musician.application.Musician)
  @Provides android.database.Cursor com.merkmod.musician.dependency.CursorModule.provideAlbumCursor(@Named("Album") com.merkmod.musician.application.Musician)
  @Provides android.database.Cursor com.merkmod.musician.dependency.CursorModule.provideArtistCursor(@Named("Artist") com.merkmod.musician.application.Musician)
  @Provides android.database.Cursor com.merkmod.musician.dependency.CursorModule.provideGenreCursor(@Named("Genres") com.merkmod.musician.application.Musician)
  @Provides android.database.Cursor com.merkmod.musician.dependency.CursorModule.providePlaylistCursor(@Named("Playlist") com.merkmod.musician.application.Musician)
  </code></pre>
  
  <p>I made multiple instances of Cursor and annotated with @Named at provider level first then it started giving me error with cannot be provided with @Provides annotation so i shifted to using it inside the constructor</p>
  
  <p>like in the code above . The problem is running a cycle again and again and i am like stuck in getting the cursor stuff done , any help will be appreaciated.</p>