Dagger and Kotlin. Dagger doesn't generate component classes

前端 未结 5 1273
无人共我
无人共我 2021-02-06 21:29

I\'m new with kotlin and Dagger. I have a little problem that I do not how to solve and I don\'t find a solution.

So this is what I have:

@Module
class A         


        
5条回答
  •  既然无缘
    2021-02-06 21:57

    If u have problem withe DaggerComponent, You should add

    apply plugin: 'kotlin-kapt'
    
    kapt {
        generateStubs = true
    }
    

    to build.gradleit will generate kotlin code for dagger 2 otherwise project will only build on Rebuild

提交回复
热议问题