Ошибка при попытки использования dagger2 для генерации файлов
Прошёлся уже по всем форумам - ничего не помогает.
Возникает ошибка:
Execution failed for task ':app:kaptDebugKotlin'. A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction java.lang.reflect.InvocationTargetException (no error message)
В dependencies у меня:
dependencies {
implementation("com.google.dagger:dagger:2.48.1")
kapt("com.google.dagger:dagger-compiler:2.43.2")
implementation("androidx.core:core-ktx:1.12.0")
...
В плагинах:
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
}
Код(AppComponent.kt):
import dagger.Component
@Component
interface AppComponent {
fun inject(activity: Activity)
}
Код(Activity .kt):
import javax.inject.Inject
class Activity {
@Inject
lateinit var keyboard: Keyboard
}
Код(Keyboard.kt):
class Keyboard @Inject constructor() {
}