title: Can't inject Room dao using Hilt, Android
body: <p>I am trying to inject a Room DAO into a repository using Hilt.
  I am using the following code:</p>
  <pre><code>def room_version = &quot;2.2.6&quot;
  ext.hilt_version = '2.33-beta'
  
  implementation &quot;androidx.room:room-runtime:$room_version&quot;
  kapt &quot;androidx.room:room-compiler:$room_version&quot;
  implementation &quot;androidx.room:room-ktx:$room_version&quot;
  implementation &quot;androidx.room:room-guava:$room_version&quot;
  testImplementation &quot;androidx.room:room-testing:$room_version&quot;
  
  implementation &quot;com.google.dagger:hilt-android:$hilt_version&quot;
  kapt &quot;com.google.dagger:hilt-compiler:$hilt_version&quot;
  </code></pre>
  <p><strong>DAO</strong></p>
  <pre><code>@Dao
  interface SearchDAO {
  
      @Query(&quot;SELECT * FROM searches_table WHERE name LIKE '%' || :query || '%'&quot;)
      fun readSearches(query : String) : Flow&lt;List&lt;SearchItem&gt;&gt;
  
      @Insert(onConflict = OnConflictStrategy.REPLACE)
      suspend fun insertSearch(search : SearchItem)
  
      @Delete
      suspend fun deleteSearch(search: SearchItem)
  }
  </code></pre>
  <p><strong>Database</strong></p>
  <pre><code>@Database(
          entities = [SearchItem::class],
          version = 1
  )
  abstract class SearchesDatabase : RoomDatabase(){
      abstract fun getSearchesDao() : SearchDAO
  }
  </code></pre>
  <p><strong>Providers</strong></p>
  <pre><code>@Module
  @InstallIn(ActivityComponent::class)
  object AppModule{
      @Singleton
      @Provides
      fun provideSearchDatabase(@ApplicationContext context : Context) =
          Room.databaseBuilder(context, SearchesDatabase::class.java, SEARCH_DATABASE_NAME)
              .fallbackToDestructiveMigration()
              .build()
  
      @Provides
      fun provideSearchDAO(appDatabase: SearchesDatabase): SearchDAO {
          return appDatabase.getSearchesDao()
      }
  }
  </code></pre>
  <p><strong>Base Application</strong></p>
  <pre><code>@HiltAndroidApp
  class BaseApplication : Application() {
  
      override fun onCreate() {
          super.onCreate()
          //Timber.plant(Timber.DebugTree())
      }
  }
  </code></pre>
  <p><strong>Repository injecting</strong></p>
  <pre><code>class Repository @Inject constructor(
      val searchesDao : SearchDAO
  ){
  ...
  }
  </code></pre>
  <p>And the problem is that I receive the following error:</p>
  <blockquote>
  <p>[Dagger/MissingBinding] com.example.leagueapp.database.SearchDAO
  cannot be provided without an @Provides-annotated method.   public
  abstract static class SingletonC implements
  BaseApplication_GeneratedInjector</p>
  </blockquote>