google/dagger

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)

mustiy20 opened this issue · 2 comments

Hello everyone, I am getting this error:
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)

My project gradle file:
buildscript{
dependencies{
classpath("com.google.dagger:hilt-android-gradle-plugin:2.38.1")
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.7.7")
classpath("com.google.gms:google-services:4.4.2")

}

}

plugins {
id("com.android.application") version "8.2.2" apply false
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
}
Module Gradle:
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("kotlin-parcelize")
id("androidx.navigation.safeargs.kotlin")
id("dagger.hilt.android.plugin")
id("kotlin-kapt")
id("com.google.gms.google-services")
}

android {
namespace = "com.example.pureattire_capstoneproject_info6134"
compileSdk = 34

defaultConfig {
    applicationId = "com.example.pureattire_capstoneproject_info6134"
    minSdk = 21
    targetSdk = 34
    versionCode = 1
    versionName = "1.0"

    testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        isMinifyEnabled = false
        proguardFiles(
            getDefaultProguardFile("proguard-android-optimize.txt"),
            "proguard-rules.pro"
        )
    }
}
compileOptions {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget = "1.8"
}
buildFeatures{
    viewBinding = true
}

}

dependencies {

implementation("androidx.core:core-ktx:1.13.1")
implementation("com.squareup:javapoet:1.13.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.firebase:firebase-auth:21.0.6")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation("br.com.simplepass:loading-button-android:2.2.0")
implementation("com.github.bumptech.glide:glide:4.14.0")
implementation("de.hdodenhof:circleimageview:3.1.0")
implementation("io.github.vejei.viewpagerindicator:viewpagerindicator:1.0.0-alpha.1")
implementation("com.shuhart.stepview:stepview:1.5.1")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.7")
implementation("com.google.dagger:hilt-android:2.38.1")
kapt("com.google.dagger:hilt-compiler:2.38.1")
kapt("com.github.bumptech.glide:compiler:4.14.0")
kapt("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.4.2")

}

Hi, nothing seems to point to a dagger failure. I'm noticing your are using an old version of dagger, can you try to bump your dependency versions (dagger and other dependencies if applicable), and if is not dagger/hilt related, maybe better to post to a different platform for better help.