-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hilt incompatible with Kotlin to 1.9 #4035
Comments
You'll need to update Hilt to 2.46 or higher where the kotlinx-metadata-jvm is updated to support newer Kotlin versions. |
I have increased the version from 2.44 to 2.46 but it is not syncing with this version. |
I have the same problem with the newest version. |
@Frosch2010 do you have more details you can share? E.g. stacktrace and versions |
@Chang-Eric thanks for your response. I fixed it now. I figured out that I used different versions. I used 2.44 for the Gradle plugin and the newest version in the dependencies. Now are both the same and it works. |
Thank you so much!! I had the same problem, but now Its working! |
thanks |
very good 👍 |
if your kotlin version is 1.9.22 set your hilt version to 2.46 and it will work fine . |
This also worked for me if you set everything to latest :
check out kotlin compatibility with kotlin compiler : https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility kotlin is 1.9.0 set hilt version to 2.46 and it is working. |
Gradle plugin: id("com.google.dagger.hilt.android") version "2.50" apply false Dependency: implementation("com.google.dagger:hilt-android:2.50") Notice that the versions are the same for both the plugin and dependencies. |
Just update everything to latest for hilt and Kotlin (1.9 and above) and it will work fine. |
id("com.google.dagger.hilt.android") version "2.51.1" apply false
[versions] Still facing the same issue damn hilt setup sometime is so irritating |
Thank you) |
plugins {
} android {
} dependencies {
} kapt { |
plugins {
} |
Updating Kotlin to 1.9 causes a build error when using Hilt 2.44
The text was updated successfully, but these errors were encountered: