Sergio C.
06/13/2022, 9:36 AMerror: [Hilt]
Unsupported metadata version. Check that your Kotlin version is >= 1.0: java.lang.IllegalStateException: Unsupported metadata version. Check that your Kotlin version is >= 1.0
How can I solve this?
using
implementation 'com.google.dagger:hilt-android:2.42'
kapt 'com.google.dagger:hilt-android-compiler:2.42'
kapt 'androidx.hilt:hilt-compiler:1.0.0'
classpath('com.google.dagger:hilt-android-gradle-plugin:2.40.1')
jim
06/13/2022, 10:22 AMhilt-android-gradle-plugin
is an old version. First thing I'd try is upgrading that from 2.40.1
to 2.42
.
If that doesn't resolve the issue, I'd try this workaround:
dependencies {
// Not a processor, but forces Dagger to use newer metadata lib
kapt "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.4.2"
}
Sergio C.
06/13/2022, 10:32 AMhilt-android-gradle-plugin
to 2.42Sergio C.
06/13/2022, 10:33 AMSergio C.
06/13/2022, 10:33 AMhilt-android-gradle-plugin
?Joffrey
06/13/2022, 1:29 PMSergio C.
06/13/2022, 1:36 PMjim
06/14/2022, 3:13 PMhilt-android
, hilt-android-compiler
, and hilt-android-gradle-plugin
are all released at the same time, and so their version numbers should always match.Sergio C.
06/14/2022, 3:30 PM