A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction

Мне нужно подключить Dagger 2 в Android приложение, но при сборке происходит ошибка из-за плагина kapt.

Часть StackTrace:

> Task :app:kaptDebugKotlin FAILED
Values of variant API AnnotationProcessorOptions.arguments are queried and may return non final values, this is unsupported

FAILURE: Build failed with an exception.

* What went wrong:
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)

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

plugins:


    plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'com.google.gms.google-services'
    id 'kotlin-kapt'
}

dependencies:


    dependencies {
        implementation 'com.google.dagger:dagger:2.38.1'
        kapt 'com.google.dagger:dagger-compiler:2.38.1'
        kapt "com.google.dagger:dagger-android-processor:2.38.1"
}

AppComponent + Module:


package com.example.petproject

import com.example.petproject.Model.Email.Verification
import dagger.Component
import dagger.Module
import dagger.Provides



@Component(modules = [AppModule::class])
interface AppComponent {
    val verification: Verification
}

@Module
object AppModule {

    @Provides
    fun provideVerification(): Verification {
        return Verification()
    }
}

Синхронизация Gradle происходит успешно, но при сборке проекта для генерации кода происходит та самая ошибка.


Ответы (0 шт):