android / codelab-android-hilt

Apache License 2.0
356 stars 190 forks source link

Hi! I believe you have to use the same version in the libraries and the gradle plugin. Can you try with: #32

Open mmn-siddiqui opened 3 years ago

mmn-siddiqui commented 3 years ago

Hi! I believe you have to use the same version in the libraries and the gradle plugin. Can you try with:

dependencies {
    classpath 'com.google.dagger:hilt-android-gradle-plugin:2.28.3-alpha'
}

Originally posted by @manuelvicnt in https://github.com/googlecodelabs/android-hilt/issues/10#issuecomment-717750343

I have the same problem but my libraries and Gradle plugin has same version

rameshkumarkhatri commented 2 years ago

I am facing the same issue. using classpath("com.google.dagger:hilt-android-gradle-plugin:2.38.1")

tridhm-3108 commented 2 years ago

I facing this problem too and solve this after follow this Stack Overflow. I think your kotlin version is not compatible with Hilt version.

th3kumar commented 2 years ago

Go to https://dagger.dev/hilt/gradle-setup and check Hilt currently version

Update: For now, you can use the newest version.

Kotlin:1.7.10 with Hilt:2.42 kotlin:1.6.0 is compatible with hilt:2.40.5 Kotlin 1.5.21 is compatible with Hilt 2.38.

by @Mario-paul Kotlin '1.8.21' with Hilt '2.46.1' compiled with no issue (2023)

Mario-paul commented 1 year ago

Go to https://dagger.dev/hilt/gradle-setup and check Hilt currently version

Update: For now, you can use the newest version.

Kotlin:1.7.10 with Hilt:2.42 kotlin:1.6.0 is compatible with hilt:2.40.5 Kotlin 1.5.21 is compatible with Hilt 2.38.

For me Kotlin '1.8.21' with Hilt '2.46.1' compiled with no issue (2023)