Hilt Unsupported metadata version in Kotlin: how to fix the error when building an Android project
Hello, colleagues! I'm a beginner in Android development and use Kotlin with Jetpack Compose. Recently I decided to add Hilt to the project for dependency injection, but encountered an error that I haven't been able to overcome for three days now.
Here's my build.gradle.kts (app):
```kotlin
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("dagger.hilt.android.plugin")
}
android {
compileSdk = 34
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
}
}
dependencies {
implementation("com.google.dagger:hilt-android:2.48")
kapt("com.google.dagger:hilt-compiler:2.48")
implementation("androidx.hilt:hilt-navigation-compose:1.1.0")
}
```
When building
No answers yet.
Log in to leave an answer
Blogs
Microservices in Rust: Architecture and Practice for Beginners
How to Merge Two Arrays in Java: 5 Ways + Code Examples
Deploying a Swift Application on VPS: Advanced Guide
Concatenating Strings in Rust: TOP-5 Beginner Mistakes (and How to Avoid Them)