Dagger 2 error with kotlin missing provider

I am trying to fix bug when using new androidx with Dagger and kotlin. It works fine when using in Java written. But, when I switch it to kotlin,

I got error: error: java.util.Map,javax.inject.Provider>> cannot be provided without an @Provides-annotated method. I am using Android Studio 3.2.1

Here is my code:

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

implementation "com.google.dagger:dagger:2.13"

implementation "com.google.dagger:dagger-android:2.13"

implementation "com.google.dagger:dagger-android-support:2.13"

kapt "com.google.dagger:dagger-compiler:2.13"

kapt "com.google.dagger:dagger-android-processor:2.13"

My AppComponent:


@Component(modules = [AppModule::class, BuildersModule::class, NetworkModule::class])

interface AppComponent {


interface Builder {


fun application(app: BaseApp): Builder

fun build(): AppComponent


fun inject(app: BaseApp)


And my AppModule:


class AppModule {



internal fun provideDataManager(): DataManager {

return DataManager()



fun provideContext(app: BaseApp)...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts