When I am adding com.google.firebase:firebase-config:19.1.0
to use firebase remote config having this issue.
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-2.5.0.jar (com.google.protobuf:protobuf-java:2.5.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
I have updated both firebase-analytics
and google-play-services
to latest version. But still the problem exist.
But when I changed remote config to older version 18.0.0 or less
then its working fine. But I want to use the latest version.
My dependencies:
firebase_analytics : "com.google.firebase:firebase-analytics:17.2.2",
fcm : "com.google.firebase:firebase-messaging:20.1.0",
performance : "com.google.firebase:firebase-perf:19.0.0",
config : "com.google.firebase:firebase-config:19.0.0",
Also tried to exclude below doesn't work:
exclude group: 'com.google.protobuf', module: 'protobuf-lite'
exclude group: 'com.google.protobuf', module: 'protobuf-java'