我在build.gradle中实现播放服务模块,现在遇到以下错误:
Duplicate class com.google.android.gms.measurement.internal.zzhg found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play- services-measurement-impl-20.0.2-runtime (com.google.android.gms:play-services-measurement-impl:20.0.2)
我试着清理项目,但没有成功
这是我的build.gradle文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.0-rc01'
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
1条答案
按热度按时间cvxl0en21#
这是两个碰撞包问题,
当包括2 Google Play服务包。它是拦截对方。
芳子用这句台词;
您还可以使用,