jetified-protobuf-javalite-3.14.0 com.google.protobuf:protobuf-javalite:3.14.0) jetified-protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1

Viewed 188

I have several projects to use the com. com.google.protobuf:protobuf-lite:3.0.1 , now, I want to integrate firebase Performance monitoring of my application, I add the following to rely on:

    implementation platform('com.google.firebase:firebase-bom:28.3.0')        
    implementation ("com.google.firebase:firebase-perf")
    implementation 'com.google.firebase:firebase-analytics:19.0.1'
    implementation 'com.google.firebase:firebase-crashlytics:18.2.1'
    implementation 'com.google.firebase:firebase-core:19.0.1'
    implementation 'com.google.firebase:firebase-messaging:22.0.0'
    implementation 'com.google.firebase:firebase-auth:21.0.1'

I will get the following questions:

Duplicate class com.google.protobuf.WireFormat$FieldType$3 found in modules jetified-protobuf-javalite-3.14.0 (com.google.protobuf:protobuf-javalite:3.14.0) and jetified-protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)

Then, I use it in the project

configurations.all {
exclude group: 'com.google.protobuf', module: "protobuf-lite"
}

Protobuf-Lite has been removed globally, after which compilation is not a problem, but when I open the application I have the following problems:

java.lang.NoClassDefFoundError: failed for class com.google.firebase.perf.v1.NetworkRequestMetric; see exception in other thread at com.google.firebase.perf.v1.NetworkRequestMetric.newBuilder(NetworkRequestMetric.java:1336) at com.google.firebase.perf.metrics.NetworkRequestMetricBuilder.(NetworkRequestMetricBuilder.java:61) at com.google.firebase.perf.metrics.NetworkRequestMetricBuilder.(NetworkRequestMetricBuilder.java:92) at com.google.firebase.perf.metrics.NetworkRequestMetricBuilder.builder(NetworkRequestMetricBuilder.java:84) at com.google.firebase.perf.network.FirebasePerfUrlConnection.instrument(FirebasePerfUrlConnection.java:186) at com.facebook.GraphRequest.createConnection(GraphRequest.java:1376) at com.facebook.GraphRequest.toHttpConnection(GraphRequest.java:1045) at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1132) at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1109) at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1093) at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:1068) at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:962) at com.facebook.internal.FetchedAppSettingsManager.getAppSettingsQueryResponse(FetchedAppSettingsManager.java:368) at com.facebook.internal.FetchedAppSettingsManager.access$000(FetchedAppSettingsManager.java:59) at com.facebook.internal.FetchedAppSettingsManager$1.run(FetchedAppSettingsManager.java:177) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) 2021-08-28 10:36:24.030 11807-11963/com.realu.dating E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: com.realu.dating, PID: 11807 java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in /data/app/com.realu.dating-wIVBwzcBmy2s70YdCgdDJA==/base.apk!classes19.dex) at com.google.firebase.perf.v1.NetworkRequestMetric.(NetworkRequestMetric.java:2460) at com.google.firebase.perf.v1.NetworkRequestMetric.newBuilder(NetworkRequestMetric.java:1336) at com.google.firebase.perf.metrics.NetworkRequestMetricBuilder.(NetworkRequestMetricBuilder.java:61) at com.google.firebase.perf.metrics.NetworkRequestMetricBuilder.(NetworkRequestMetricBuilder.java:92) at com.google.firebase.perf.metrics.NetworkRequestMetricBuilder.builder(NetworkRequestMetricBuilder.java:84) at com.google.firebase.perf.network.FirebasePerfUrlConnection.instrument(FirebasePerfUrlConnection.java:186) at com.facebook.GraphRequest.createConnection(GraphRequest.java:1376) at com.facebook.GraphRequest.toHttpConnection(GraphRequest.java:1045) at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1132) at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1109) at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1093) at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:1068) at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:962)

What should I do about it, thanks

0 Answers
Related