Hi team! I have an issue with one of my dependenci...
# multiplatform
f
Hi team! I have an issue with one of my dependencies:
Copy code
androidMain.dependencies {
            implementation(libs.compose.ui.tooling.preview)
            implementation(libs.androidx.activity.compose)
            implementation(libs.landscapist)
            implementation(libs.compose.material3)
            implementation(libs.androidx.navigation.compose)
            implementation(libs.androidx.navigation.common.ktx)
            implementation(libs.androidx.navigation.runtime.ktx)
            implementation(libs.androidx.media3.ui)
            implementation(libs.androidx.media3.exoplayer)
            implementation(libs.androidx.media3.session)
            implementation(libs.androidx.room.compiler)
}
When I add
libs.androidx.room.compiler
this error show up at the compilation:
Duplicate class org.intellij.lang.annotations.Identifier found in modules annotations-12.0.jar -> annotations-12.0 (com.intellijannotations12.0) and annotations-23.0.0.jar -> annotations-23.0.0 (org.jetbrainsannotations23.0.0)
So I know the issue is due to a part of the room compiler dependency, but I don't find the proper way to exclude the part that produce the error ? Anyone got the same issue or an exemple of how to exclude something from a dependency ? Thanks 🙃
c
Why do you add the compiler to the classpath in the first place? It’s an annotation processor and should not be added as an
implementation
but to the
kapt
or
ksp
configuration. https://developer.android.com/jetpack/androidx/releases/room