I am using cordova-plugin-firebase-analytics and cordova-plugin-admob-free and getting error as
java.lang.RuntimeException: Duplicate class com.google.android.gms.common.api.zza found in modules jetified-play-services-base-11.0.4-runtime.jar (com.google.android.gms:play-services-base:11.0.4) and jetified-play-services-basement-17.0.0-runtime.jar (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.api.zzb found in modules jetified-play-services-base-11.0.4-runtime.jar (com.google.android.gms:play-services-base:11.0.4) and jetified-play-services-basement-17.0.0-runtime.jar (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzb found in modules jetified-play-services-base-11.0.4-runtime.jar (com.google.android.gms:play-services-base:11.0.4) and jetified-play-services-basement-17.0.0-runtime.jar (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzq found in modules jetified-play-services-base-11.0.4-runtime.jar (com.google.android.gms:play-services-base:11.0.4) and jetified-play-services-basement-17.0.0-runtime.jar (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzr found in modules jetified-play-services-base-11.0.4-runtime.jar (com.google.android.gms:play-services-base:11.0.4) and jetified-play-services-basement-17.0.0-runtime.jar (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzs found in modules jetified-play-services-base-11.0.4-runtime.jar (com.google.android.gms:play-services-base:11.0.4) and jetified-play-services-basement-17.0.0-runtime.jar (com.google.android.gms:play-services-basement:17.0.0)
By doing some research I found that I need to match PLAY_SERVICES_VERSION for both the plugins, so tried as below
<plugin name="cordova-plugin-firebase-analytics" source="npm">
<variable name="PLAY_SERVICES_VERSION" value="11.0.0" />
</plugin>
<plugin name="cordova-plugin-admob-free">
<variable name="ADMOB_APP_ID" value="####" />
<variable name="PLAY_SERVICES_VERSION" value="11.0.0" />
</plugin>
But facing the same issue, By googling more found that we need to remove
implementation ‘com.google.android.gms:play-services:11.0.1’
But how to do that in config.xml
What is the solution, Can anyone guide?