When using firebase and pub sub lite client library together. I have lot of conflict of dependencies which I resolved by following configuration.
implementation('com.google.cloud:google-cloud-pubsublite:1.12.12') {
exclude group: 'com.google.guava', module: 'guava'
}
configurations.configureEach {
exclude group: 'com.google.protobuf' ,module: 'protobuf-javalite'
exclude group: 'com.google.firebase', module: 'protolite-well-known-types'
}
Now when I use release build with isMinified = true, I get this crash. Is there way to resolve this issue.
FATAL EXCEPTION: main
Process: PID: 14233
java.lang.RuntimeException: Failed to call observer method
at androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:232)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeMethodsForEvent(ClassesInfoCache.java:199)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeCallbacks(ClassesInfoCache.java:190)
at androidx.lifecycle.ReflectiveGenericLifecycleObserver.onStateChanged(ReflectiveGenericLifecycleObserver.java:40)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:360)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:271)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:313)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:151)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134)
at androidx.lifecycle.ProcessLifecycleOwner.activityStarted(ProcessLifecycleOwner.java:112)
at androidx.lifecycle.ProcessLifecycleOwner$3$1.onActivityPostStarted(ProcessLifecycleOwner.java:177)
at android.app.Activity.dispatchActivityPostStarted(Activity.java:1421)
at android.app.Activity.performStart(Activity.java:8409)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3667)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:224)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:204)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2304)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7925)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)
Caused by: java.lang.RuntimeException: Field isAuto_ for com.google.firebase.perf.v1.TraceMetric not found. Known fields are [private int com.google.firebase.perf.v1.TraceMetric.bitField0_, private long com.google.firebase.perf.v1.TraceMetric.clientStartTimeUs_, private com.google.protobuf.MapFieldLite com.google.firebase.perf.v1.TraceMetric.counters_, private com.google.protobuf.MapFieldLite com.google.firebase.perf.v1.TraceMetric.customAttributes_, private long com.google.firebase.perf.v1.TraceMetric.durationUs_, private java.lang.String com.google.firebase.perf.v1.TraceMetric.name_, private com.google.protobuf.Internal$ProtobufList com.google.firebase.perf.v1.TraceMetric.perfSessions_, private com.google.protobuf.Internal$ProtobufList com.google.firebase.perf.v1.TraceMetric.subtraces_, private static final com.google.firebase.perf.v1.TraceMetric com.google.firebase.perf.v1.TraceMetric.DEFAULT_INSTANCE, private static volatile com.google.protobuf.Parser com.google.firebase.perf.v1.TraceMetric.PARSER]
at com.google.protobuf.MessageSchema.reflectField(MessageSchema.java:616)
at com.google.protobuf.MessageSchema.newSchemaForRawMessageInfo(MessageSchema.java:509)
at com.google.protobuf.MessageSchema.newSchema(MessageSchema.java:229)
at com.google.protobuf.ManifestSchemaFactory.newSchema(ManifestSchemaFactory.java:78)
at com.google.protobuf.ManifestSchemaFactory.createSchema(ManifestSchemaFactory.java:72)
at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:91)
at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:105)
at com.google.protobuf.GeneratedMessageLite$Builder.buildPartial(GeneratedMessageLite.java:507)
2023-08-08 07:37:27.715 14233-14233 AndroidRuntime
E at com.google.protobuf.GeneratedMessageLite$Builder.build(GeneratedMessageLite.java:513)
at com.google.firebase.perf.metrics.AppStartTrace.onAppEnteredForeground(AppStartTrace.java:462)
at java.lang.reflect.Method.invoke(Native Method)
at androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:222)
... 25 more
How can I resolve this issue?