How can I add Firebase Performance Monitoring to a project? #2402
-
When I follow the instructions to add Firebase Performance Monitoring I start getting compilation problems due to duplicated classes related to protobuf:
If I try to exclude the duplicate libraries from performance like this, then the app crashes as soon as it runs:
I've found out I'm able to compile with the following block though:
Now this throws some warnings during compilation, like
…but it seems to work so far from what I've tested. Is this the correct way to fix the problem? What do I do if I use something from that library that crashes at runtime? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
@chokokatana implementation("com.google.firebase:firebase-perf-ktx:20.1.0") {
exclude("com.google.protobuf", "protobuf-javalite")
} |
Beta Was this translation helpful? Give feedback.
-
That's not enough to prevent conflicts during build:
|
Beta Was this translation helpful? Give feedback.
-
It looks like if you don't use the method in the warning, should be fine? |
Beta Was this translation helpful? Give feedback.
-
@chokokatana implementation("com.trustwallet:wallet-core:2.9.8")
implementation("com.google.firebase:firebase-perf:20.1.0") {
exclude("com.google.firebase", "protolite-well-known-types")
exclude("com.google.protobuf", "protobuf-javalite")
} |
Beta Was this translation helpful? Give feedback.
-
Should be fixed, latest wallet core build also uses protobuf-javalite |
Beta Was this translation helpful? Give feedback.
Should be fixed, latest wallet core build also uses protobuf-javalite