Firebase:程序类型已存在:com.google.android.gms.ads.identifier.AdvertisingIdClient $ zza

时间:2018-11-03 01:26:01

标签: android firebase android-gradle

当我尝试生成apk时,Android Studio 3.2.1上出现以下错误

  

错误:程序类型已存在:com.google.android.gms.ads.identifier.AdvertisingIdClient $ zza

我无法解决。

Android:

`apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId 'com.xxx.xxx'
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),                 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:22.2.0'
    implementation 'com.android.support:support-v4:22.2.0'
    implementation 'com.google.android.gms:play-services-analytics:7.3.0'
    implementation 'com.google.android.gms:play-services-ads:7.5.0'
    implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'`

所有库:

`apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId 'com.xxx.xxx'
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),  'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:22.2.0'
    implementation 'com.android.support:support-v4:22.2.0'
    implementation 'com.google.android.gms:play-services-analytics:7.3.0'
    implementation 'com.google.android.gms:play-services-ads:7.5.0'
    implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'`

Google插件

`apply plugin: 'com.google.gms.google-services'`

0 个答案:

没有答案