gpt4 book ai didi

android - 找到重复的类 com.google.android.gms.location.places.zza

转载 作者:行者123 更新时间:2023-11-29 23:11:02 25 4
gpt4 key购买 nike

这些是我在 list 文件中的依赖项


implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services:11.4.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-firestore:18.0.0'
implementation "com.google.android.libraries.places:places:1.1.0"


我遇到了错误

Duplicate class com.google.android.gms.location.places.zza found in modules classes.jar (com.google.android.gms:play-services-places-placereport:16.0.0) and classes.jar (com.google.android.gms:play-services-places:11.4.0)

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

我该如何解决这个问题?

最佳答案

移除以下依赖:

implementation 'com.google.android.gms:play-services:11.4.0'

来自docs :

Note: Don't use the combined play-services target. It brings in dozens of libraries, bloating your application. Instead, specify only the specific Google Play services APIs your app uses.

只使用特定的库,例如:

implementation 'com.google.android.gms:play-services-analytics:16.0.8'

关于android - 找到重复的类 com.google.android.gms.location.places.zza,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56019234/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com