com.google.protobuf.abstractmessagelite在模块中发现的Protobuf-java-3.15.3

发布于 2025-01-24 09:30:27 字数 2359 浏览 4 评论 0原文

我试图添加firestore依赖性,在执行此操作之后,我遇到了以下错误:

引起: 。

​问题。

依赖关系{

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'

}

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'

}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文