'Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-3.15.3
I tried to add the firestore dependency and after I did this I got a error saying the following:
Caused by: java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-3.15.3 (com.google.protobuf:protobuf-java:3.15.3) and protobuf-javalite-3.19.2 (com.google.protobuf:protobuf-javalite:3.19.2)
The following code are all the dependencies I use hope someone can find the problem.
dependencies {
implementation("androidx.compose.foundation:foundation:1.2.0-alpha07")
implementation 'androidx.core:core-ktx:1.7.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.3.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
// ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0"
// Hilt
implementation "com.google.dagger:hilt-android:2.40.5"
kapt "com.google.dagger:hilt-compiler:2.40.5"
// Room
implementation "androidx.room:room-runtime:2.4.1"
implementation "androidx.room:room-ktx:2.4.1"
kapt "androidx.room:room-compiler:2.4.1"
// Navigation
implementation "androidx.navigation:navigation-compose:2.4.0"
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
//animated navigation
implementation "androidx.navigation:navigation-compose:2.5.0-alpha04"
//implementation "com.google.accompanist:accompanist-navigation-animation:0.16.0"
//IGDB
implementation 'com.github.husnjak:IGDB-API-JVM:1.0.5'
testImplementation "androidx.arch.core:core-testing:2.1.0"
//coil
implementation("io.coil-kt:coil-compose:2.0.0-rc01")
//fuel
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.1'
//system ui
implementation "com.google.accompanist:accompanist-systemuicontroller:0.17.0"
// Import the Firebase BoM
implementation platform('com.google.firebase:firebase-bom:29.3.1')
// When using the BoM, you don't specify versions in Firebase library dependencies
// Declare the dependency for the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics-ktx'
// Declare the dependencies for any other desired Firebase products
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-firestore'
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
