When I add Dagger 2 dependency and trying to use it in code, studio see library of Dagger and I can use annotation such as @Container and @Inject, but when I try to build project, Dagger 2 doesn’t create container. I tried different ways to apply dependencies and result is the same, or Gradle doesn’t sync. I’ll not show how I tried to add Dagger dependencies, because I already tried like 20 ways to do that, with older Gradle and JDK versions, or on gradle.kts. With kapt, with ksp, with annotationProccessor. It doesn’t work
import javax.inject.Inject
class Activity {
@Inject
lateinit var keyboard: Keyboard
init {
}
import javax.inject.Inject
class Keyboard @Inject constructor() {
}
import dagger.Component
@Component
interface NewComponent {
fun inject(activity: Activity)
}