当前位置: 首页 > 知识库问答 >
问题:

错误重复输入:com/google/android/gms/internal/measurement/zzxd。android studio类

张和颂
2023-03-14

我在尝试构建apk时出现以下错误:

错误:任务“:app:transformClassesWithJarMergingForDebug”的执行失败。通用域名格式。Android建筑应用程序编程接口。t ``变换。TransformException:java。util。拉链ZipException:重复输入:com/google/android/gms/internal/measurement/zzxd。班

这是我的构建应用程序代码

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "28.0.0-rc1"
    defaultConfig {
        applicationId "com.appname"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support.constraint:constraint-layout:1.1.0'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.android.support:design:27.1.1'
compile 'com.google.firebase:firebase-core:15.0.0'
compile 'com.google.firebase:firebase-messaging:15.0.0'
compile 'com.google.android.gms:play-services-ads:15.0.0'
compile 'com.google.firebase:firebase-crash:15.0.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

提前谢谢你

共有1个答案

杜诚
2023-03-14

我通过将Firebase版本更新到最新版本来解决问题

'com.google.firebase:firebase-messaging:15.0.2'
'com.google.android.gms:play-services-ads:15.0.1'
'com.google.firebase:firebase-crash:15.0.2'
 类似资料: