As I’m new to Android studio so its hard for me to remove this error !!
this is the error showing on doing rebuild project :
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
- Try:
Run with –stacktrace option to get the stack trace.
Run with –info or –debug option to get more log output.
Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 1m 25s
54 actionable tasks: 54 executed
The build scan was not published due to a configuration problem.
The Gradle Terms of Service have not been agreed to.
For more information, please see https://gradle.com/help/plugin-terms-of-service.
Alternatively, if you are using Gradle Enterprise, specify the server location.
For more information, please see https://gradle.com/help/plugin-enterprise-config.
`My Build.gradle(Module file) :
buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
// jcenter() is deprecated; remove if not necessary
// jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.44'
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
classpath 'com.android.tools.build:gradle:8.0.4'
def nav_version = "2.5.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
}
plugins {
id 'com.android.application' version '8.5.1' apply false
id 'com.android.library' version '8.5.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
}
tasks.register('clean', Delete) {
//noinspection GrDeprecatedAPIUsage
delete rootProject.buildDir
}`
My Build.gradle(app) :
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-parcelize'
id 'androidx.navigation.safeargs.kotlin'
id 'kotlin-kapt'
id("com.google.dagger.hilt.android")
id 'com.google.gms.google-services'
id 'dagger.hilt.android.plugin'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.dagger.hilt.android'
apply plugin: 'kotlin-kapt' // For Kotlin projects
android {
compileSdk 34
testOptions {
unitTests.all {
useJUnitPlatform() // Enable JUnit 5 platform
}
}
packagingOptions {
exclude 'META-INF/LICENSE.md'
}
defaultConfig {
applicationId "com.example.alphaomega"
minSdk 23
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'
}
buildTypes {
release {
minifyEnabled 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'
languageVersion = "1.9"
}
buildFeatures {
viewBinding true
}
namespace 'com.example.alphaomega'
}
dependencies {
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
implementation 'com.google.android.recaptcha:recaptcha:18.5.1'
//loading button
implementation 'br.com.simplepass:loading-button-android:2.2.0' // Removed space//Glide
implementation 'com.github.bumptech.glide:glide:4.13.0' // Removed space
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
androidTestImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
//noinspection GradleDependency
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.0"
annotationProcessor "com.google.dagger:dagger-compiler:2.44"
implementation "com.google.dagger:dagger:2.44"
//noinspection LifecycleAnnotationProcessorWithJava8
kapt "androidx.lifecycle:lifecycle-compiler:2.8.4"
// (Optional) If you also have JUnit 4 tests
testImplementation("org.junit.vintage:junit-vintage-engine:5.9.2")
//circular image
implementation 'de.hdodenhof:circleimageview:3.1.0' // Removed space
//viewpager2 indication
implementation 'io.github.vejei.viewpagerindicator:viewpagerindicator:1.0.0-alpha.1' // Removed space
//stepView
implementation 'com.shuhart.stepview:stepview:1.5.1' // Removed space
//Android Ktx
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
//Dagger hilt
implementation("com.google.dagger:hilt-android:2.44")
kapt("com.google.dagger:hilt-android-compiler:2.44")
//FireBase
implementation 'com.google.firebase:firebase-auth:23.0.0'
}
// Allow references to generated code
kapt {
correctErrorTypes = true
}`
`
Help me to find what’s the error !!!
Jayant Lal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.