0

We are trying to integrate Marketing Cloud SDK for our android application.But while building the application its gives us error of duplicate files of firebase.We have already implemented firebase in our code. We our using firebase version -

'com.google.firebase:firebase-messaging:20.2.0'

And Marketing Cloud SDK version is - com.salesforce.marketingcloud:marketingcloudsdk:7.4.2

After Building this error comes -

Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: 
  Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-20.1.5-runtime.jar (com.google.firebase:firebase-iid:20.1.5) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzb found in modules jetified-firebase-iid-20.1.5-runtime.jar (com.google.firebase:firebase-iid:20.1.5) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

1 Answer 1

2

Either remove the duplicated dependencies from your application or exclude them from the SDK using Gradle's implementation ('mc sdk') { exclude ... } syntax.

1
  • Thanks for the help. By implementing this duplication of firebase files has been resolved. However, It leads to crash our application. Giving error of Caused by java.lang.NoSuchMethodError. No virtual method getToken()
    – user104706
    Commented Sep 20, 2021 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .