gpt4 book ai didi

java - 在模块 jetified-firebase-analytics-impl-1 中发现重复的类 com.google.android.gms.measurement.AppMeasurement

转载 作者:太空宇宙 更新时间:2023-11-04 09:13:10 27 4
gpt4 key购买 nike

我正在尝试将我的 Android 应用程序连接到 Google Calander API,但我被卡住了。我的应用程序中有很多关于重复的错误,但不知道为什么。我更新了所有模块。我的错误:

Duplicate class com.google.android.gms.measurement.AppMeasurement found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$ConditionalUserProperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Event found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$EventInterceptor found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$OnEventListener found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Param found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$UserProperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.1)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.1)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Event found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.1)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Param found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.1)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$UserProperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.1-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.1)

我的gradle:

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-database:19.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation "com.google.firebase:firebase-auth:19.2.0"
implementation 'com.google.android.gms:play-services-auth:17.0.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.apis:google-api-services-calendar:v3-rev401-1.25.0'
implementation 'com.google.api-client:google-api-client:1.30.7'
implementation 'com.google.api-client:google-api-client-android:1.30.7'
implementation 'com.google.api-client:google-api-client-gson:1.19.1'
}

最佳答案

删除实现“com.google.android.gms:play-services:12.0.1”依赖项并改用单独的依赖项。com.google.android.gms:play-services:12.0.1 内部包含大量依赖项。使用 play-services 可能会导致 dex 问题和沉重的应用程序。仅选择您真正依赖的。 source

关于java - 在模块 jetified-firebase-analytics-impl-1 中发现重复的类 com.google.android.gms.measurement.AppMeasurement,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59431020/

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