Ошибка разрешения зависимости для com.google. android .gms.common.api.internal.zza - PullRequest
0 голосов
/ 26 марта 2020

Я получаю следующую ошибку в Android Studio 3.6.1 при сборке:

Android Studio только что предложила обновить firebase, и я сделал.

Duplicate class com.google.android.gms.common.api.internal.zzb found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Duplicate class com.google.android.gms.common.api.internal.zzc found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Duplicate class com.google.android.gms.common.api.internal.zzd found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Duplicate class com.google.android.gms.common.api.zza found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Duplicate class com.google.android.gms.common.api.zzb found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Duplicate class com.google.android.gms.common.internal.zzb found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Duplicate class com.google.android.gms.common.internal.zzr found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Duplicate class com.google.android.gms.common.internal.zzs found in modules jetified-play-services-base-11.6.0-runtime.jar (com.google.android.gms:play-services-base:11.6.0) and jetified-play-services-basement-17.2.0-runtime.jar (com.google.android.gms:play-services-basement:17.2.0)
Go to the documentation to learn how to Fix dependency resolution errors.

Я используя gradle-5.6.4

Я добавил это в свой build.gradle, как предлагал другой поток, но безуспешно:

configurations.all {
    resolutionStrategy {
        force 'com.google.android.gms:play-services-basement:17.2.0'
    }
}

1 Ответ

0 голосов
/ 27 марта 2020

Добавил исключение для всех моих зависимостей:

implementation ('com.some.dependency:x.x.x') {
        transitive = true
        exclude group: 'com.google.android.gms'
}

Затем удалил его один за другим из всех зависимостей, пока не нашел пакет виновника, который использовал устаревший com.google. android .gms .

...