gpt4 book ai didi

android - 程序类型已经存在 : com. google.android.gms.internal.measurement.zzdz

转载 作者:太空狗 更新时间:2023-10-29 13:02:47 25 4
gpt4 key购买 nike

我正在尝试将依赖项更新到最新版本。我根据提示安装 Android Studio 提供的新版本。但是当你启动应用程序时,出现了这个错误:

Error: Program type already present: com.google.android.gms.internal.measurement.zzdz

我的 build.gradle(模块):

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
defaultConfig {
applicationId '***'
minSdkVersion 16
targetSdkVersion 27
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
vectorDrawables.useSupportLibrary true
renderscriptTargetApi 27
renderscriptSupportModeEnabled true
}
lintOptions {
checkReleaseBuilds false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.billingclient:billing:1.1'
implementation 'com.google.zxing:core:3.3.0'
implementation 'com.google.android.gms:play-services-ads:17.1.0'
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'
implementation 'com.facebook.android:facebook-login:4.35.0'
implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
testImplementation 'junit:junit:4.12'
}

我的build.gradle(项目):

buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
maven {
url 'https://maven.fabric.io/public'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.25.4'
}
}

allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

如何避免这个错误?什么依赖冲突?

更新:

如果我尝试将 firebase-core 的版本更改为

implementation 'com.google.firebase: firebase-core: 16.0.4'

在这种情况下,应用程序可以正常运行,但 Android Studio 会突出显示这一行:

enter image description here

最佳答案

修复了 play-services-ads:17.1.1firebase-core:16.0.5

关于android - 程序类型已经存在 : com. google.android.gms.internal.measurement.zzdz,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53224402/

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