Closed ashifali3147 closed 6 months ago
I found a few problems with this issue:
Hi @ashifali3147, thank you for reaching out. I tried reproducing the issue, however, I'm having difficulty with due to compatibility issues. Could you share an MCVE to help us investigate the issue?
Aside from that, I noticed that you're not using the latest versions on Firebase products. Could you update to the latest version and see if the issue persists?
I already tried to update them with the Firebase BOM. Everything is working fine. But this issue still exists with in-app messaging. Also, previously, I was using Firebase PERF, and it's working with no issue, but after using BOM, I am getting the same protobuf duplicate class issue with PERF as well.
After adding In-App Messaging I am getting this conflicts.
Thanks for the additional information. Based on the screenshot you shared, it looks to me that you also have both protobuf-java:2.5.0
and protobuf-javalite:3.14.0
dependecy. There is a known issue that you can't mix regular protobuf and proto-lite in the same app. You can also check this StackOverflow post.
Firebase uses protobuf-lite. That said, we recommend using the protobuf-lite to avoid dependency issue.
Here’s my updated app/build.gradle.kts file where I did not encounter any issue.
implementation("io.grpc:grpc-protobuf-lite:1.57.2")
// implementation("com.google.protobuf:protobuf-java:2.5.0")
implementation("com.google.protobuf:protobuf-javalite:3.14.0")
implementation(platform("com.google.firebase:firebase-bom:33.0.0"))
implementation("com.google.firebase:firebase-inappmessaging-display")
I'll go ahead and close this issue now. Let me know if there's any misunderstanding or we need to re-open for further investigation. Thanks!
Environment:
Problem:
I am working on an Android project that uses multiple Firebase libraries, which have been functioning without any issues. However, I recently attempted to implement Firebase In-App Messaging, and this has led to a build failure with an error indicating a "duplicate protobuf class".
Error:
Steps to reproduce:
Trying to add this dependency
implementation("com.google.firebase:firebase-inappmessaging-display:21.0.0")
Attempted Solutions:
Despite these attempts, the problem persists. My project's relevant dependencies are as follows: