How to fix this issue?
error: The compiler option dagger.hilt.android.internal.projectType is not a recognized Hilt option. Is there a typo?
error: The compiler option dagger.hilt.android.internal.projectType is not a recognized Hilt option. Is there a typo?
error: The compiler option dagger.hilt.android.internal.projectType is not a recognized Hilt option. Is there a typo?
error: The compiler option dagger.hilt.android.internal.projectType is not a recognized Hilt option. Is there a typo?
warning: The following options were not recognized by any processor: '[kapt.kotlin.generated, dagger.fastInit, dagger.hilt.android.internal.projectType]'
This is my build file. After adding id("com.google.dagger.hilt.android") I'm facing this issue. If I remove that line I'm facing another issue public final class AppController extends android. app.Application { ^ Expected @HiltAndroidApp to have a value. Did you forget to apply the Gradle Plugin? (dagger.hilt.android.plugin)
plugins {
id ("kotlin-kapt")
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.dagger.hilt.android")
}
android {
namespace = "com.boscosoft.audit.sapt"
compileSdk = 34
defaultConfig {
applicationId = "com.boscosoft.audit.sapt"
minSdk = 24
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
}
buildFeatures {
dataBinding = true
viewBinding =true
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
//SDP library for dimensions
implementation ("com.intuit.sdp:sdp-android:1.1.0")
//Hilt
implementation("com.google.dagger:hilt-android:2.40.5")
kapt("com.google.dagger:hilt-android-compiler:2.40.5")
//ViewModel & LiveData
implementation ("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
implementation ("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0")
//Stetho Debug library
implementation ("com.facebook.stetho:stetho:1.5.1")
implementation ("com.facebook.stetho:stetho-okhttp3:1.5.1")
}
kapt {
correctErrorTypes = true
}```