Question: I got this error when I try to generate signed apk for my project

> 
> Duplicate class com.google.android.gms.measurement.AppMeasurement
>  found in modules classes.jar
>  (com.google.android.gms:play-services-measurement-impl:16.5.0) and
>  classes.jar (com.google.firebase:firebase-analytics-impl:10.0.1)
>  Duplicate class com.google.firebase.analytics.FirebaseAnalytics found
>  in modules classes.jar
>  (com.google.android.gms:play-services-measurement-api:16.5.0) and
>  classes.jar (com.google.firebase:firebase-analytics-impl:10.0.1)
>  Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Event
>  found in modules classes.jar
>  (com.google.android.gms:play-services-measurement-api:16.5.0) and
>  classes.jar (com.google.firebase:firebase-analytics-impl:10.0.1)
>  Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Param
>  found in modules classes.jar
>  (com.google.android.gms:play-services-measurement-api:16.5.0) and
>  classes.jar (com.google.firebase:firebase-analytics-impl:10.0.1)
>  Duplicate class
>  com.google.firebase.analytics.FirebaseAnalytics$UserProperty found in
>  modules classes.jar
>  (com.google.android.gms:play-services-measurement-api:16.5.0) and
>  classes.jar (com.google.firebase:firebase-analytics-impl:10.0.1)
> 
> 
> 

Go to the documentation to learn how to Fix dependency resolution errors.

how do I fix It?

Answer: 
Try with 

```
implementation("com.google.android.gms:play-services-gcm:$project.playServicesVersion") {
    exclude group: 'com.google.android.gms'
}

```

You can Try including one by one the one which brings errors you apply 

```
 implementation("**API**") {
    exclude group: 'com.google.android.gms'
}

```

**NB** `$project.playServicesVersion` could be any of your versions you are using
Reason: This error usually occurs due to depedencies using same functionality.

Solution: To revolve such issue is to comment: play-services because play-services-maps has same functions like play-services and also display locations on our android UI system. Please see below for solution. 

//implementation 'com.google.android.gms:play-services:12.0.1'

implementation 'com.google.android.gms:play-services-maps:17.0.0'

Also checkout notable transitive dependencies: <https://github.com/firebase/FirebaseUI-Android/releases>

I hope its help solve so many developers project issues.