Akram Bensalem
07/13/2021, 2:10 PMThe Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found.
I wan't to use Hilt with Jetpack Compose but always I got this errorsolidogen
07/13/2021, 3:16 PMFunkyMuse
07/14/2021, 6:44 AMAkram Bensalem
07/14/2021, 8:06 AM7.0.0-beta05
FunkyMuse
07/14/2021, 8:06 AMAkram Bensalem
07/14/2021, 8:09 AMsolidogen
07/14/2021, 8:11 AMAkram Bensalem
07/14/2021, 8:11 AMFunkyMuse
07/14/2021, 8:12 AMsolidogen
07/14/2021, 8:13 AMAkram Bensalem
07/14/2021, 8:14 AMsolidogen
07/14/2021, 8:16 AMAkram Bensalem
07/14/2021, 8:17 AMbuild.gradle
build.gradle.kts
solidogen
07/14/2021, 8:18 AMAkram Bensalem
07/14/2021, 8:19 AMsolidogen
07/14/2021, 8:19 AMAkram Bensalem
07/14/2021, 8:20 AMplugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
android {
compileSdk 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.akram.bensalem.powersh"
minSdk 21
targetSdk 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '<http://proguard-rules.pro|proguard-rules.pro>'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = '1.8'
useIR = true
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling:1.0.0-beta09"
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation("androidx.datastore:datastore-preferences:1.0.0-rc01")
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.3.0-rc01'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
implementation 'com.google.android.material:material:1.4.0'
implementation "androidx.compose.foundation:foundation:$compose_version"
// Material design icons
implementation "androidx.compose.material:material-icons-core:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
// Integration with activities
implementation 'androidx.activity:activity-compose:1.3.0-rc01'
// Integration with ViewModels
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha07'
// Integration with observables
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
implementation "androidx.compose.runtime:runtime-rxjava2:$compose_version"
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
implementation "androidx.navigation:navigation-compose:2.4.0-alpha04"
implementation "androidx.compose.compiler:compiler:$compose_version"
implementation 'androidx.palette:palette-ktx:1.0.0'
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation 'dev.chrisbanes.accompanist:accompanist-coil:0.3.3.1'
// UI Tests
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
implementation "com.airbnb.android:lottie-compose:1.0.0-rc01-1"
//Accompanist
implementation "com.google.accompanist:accompanist-systemuicontroller:0.12.0"
implementation "com.google.accompanist:accompanist-pager:0.12.0"
implementation "com.google.accompanist:accompanist-pager-indicators:0.12.0"
implementation "com.google.accompanist:accompanist-coil:0.12.0"
implementation "com.google.accompanist:accompanist-swiperefresh:0.12.0"
implementation "com.google.accompanist:accompanist-insets:0.12.0"
// If using insets-ui
implementation "com.google.accompanist:accompanist-insets-ui:0.12.0"
implementation 'androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha08'
implementation 'com.google.code.gson:gson:2.8.6'
implementation "com.github.skydoves:orchestra-balloon:1.0.7"
}
solidogen
07/14/2021, 8:20 AMAkram Bensalem
07/14/2021, 8:20 AMFunkyMuse
07/14/2021, 8:21 AMsolidogen
07/14/2021, 8:21 AMAkram Bensalem
07/14/2021, 8:32 AMFunkyMuse
07/14/2021, 8:32 AMAkram Bensalem
07/14/2021, 8:33 AM