更新后的错误play-services“程序类型已经存在:com.google.android.gms.internal.measurement.zzabo” [英] Error after Updating play-services "Program type already present: com.google.android.gms.internal.measurement.zzabo"

查看:2063
本文介绍了更新后的错误play-services“程序类型已经存在:com.google.android.gms.internal.measurement.zzabo”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将播放服务依赖关系更新至15.0.0版,并将play-services-safetynet添加到我的app.gradle。之后,我总是得到


程序类型已经存在:com.google.android.gms.internal.measurement.zzabo
消息{kind = ERROR,text =程序类型已经存在:com.google.android.gms.internal.measurement.zzabo,sources = [未知源文件],工具名称= Optional.of(D8)}


构建应用程序时。这里是我的app.build:

  apply plugin:'com.android.application'

android {
signingConfigs {
}
compileSdkVersion 27
buildToolsVersion '27 .0.3'
defaultConfig {
applicationIdXXXXXXX
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName0.0.0.1
setProperty(archivesBaseName,XXXXXXX- $ versionName)
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
packagingOptions {
排除'META-INF / ASL2.0'
排除'META-INF / LICENSE'
排除'META-INF / license.txt'
排除'META-INF / NOTICE '
exclude'META-INF / notice.txt'
}
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
依赖项{
编译fileTree(包括:[' * .jar'],dir:'libs')

编译'com.android.support:support-v4:27.1.1'
compile'c​​om.android.support:design: 27.1.1'
compile'c​​om.android.support:appcompat-v7:27.1.1'
compile'c​​om.android.support:recyclerview-v7:27.1.1'
compile' com.android.support.constraint:constraint-layout:1.1.0'
compile'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile'c​​om。 fasterxml.jackson.core:jackson-databind:2.3.2'
compile'c​​om.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'
implementation'com.google.firebase:firebase-core:15.0。 0'
实施'com.google.firebase:firebase-messaging:15.0.0'
实施on'com.google.firebase:firebase-appindexing:15.0.0'
implementation'com.google.android.gms:play-services-location:15.0.0'
implementation'com.google。 android.gms:play-services-safetynet:15.0.0'
compile'org.kefirsf:kefirbb:1.5'
compile'org.osmdroid:osmdroid-android:6.0.1'
testCompile'junit:junit:4.12'
}
apply plugin:'com.google.gms.google-services'


解决方案

在我的情况下,我必须在项目的build.gradle中将Firebase从版本15.0.0更新到15.0.2:

 依赖关系{
...
实现com.google.firebase:firebase-messaging:15.0.2
...
}

然后在app的build.gradle中,我必须更新google从3.1.1到3.3.0的服务:

pre code $ dependencies {
...
classpath' com.google.gms:google-services:3.3.0'
...
}


I updated play-services dependencies to version 15.0.0 and also added play-services-safetynet to my app.gradle. After that i always get

Program type already present: com.google.android.gms.internal.measurement.zzabo Message{kind=ERROR, text=Program type already present: com.google.android.gms.internal.measurement.zzabo, sources=[Unknown source file], tool name=Optional.of(D8)}

when building the app. here is my app.build:

apply plugin: 'com.android.application'

android {
    signingConfigs {
    }
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "XXXXXXX"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "0.0.0.1"
        setProperty("archivesBaseName", "XXXXXXX-$versionName")
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }
    productFlavors {
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile 'com.android.support:support-v4:27.1.1'
    compile 'com.android.support:design:27.1.1'
    compile 'com.android.support:appcompat-v7:27.1.1'
    compile 'com.android.support:recyclerview-v7:27.1.1'
    compile 'com.android.support.constraint:constraint-layout:1.1.0'
    compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.3.2'
    compile 'com.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'
    implementation 'com.google.firebase:firebase-core:15.0.0'
    implementation 'com.google.firebase:firebase-messaging:15.0.0'
    implementation 'com.google.firebase:firebase-appindexing:15.0.0'
    implementation 'com.google.android.gms:play-services-location:15.0.0'
    implementation 'com.google.android.gms:play-services-safetynet:15.0.0'
    compile 'org.kefirsf:kefirbb:1.5'
    compile 'org.osmdroid:osmdroid-android:6.0.1'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

解决方案

In my case, I had to update Firebase from version 15.0.0 to 15.0.2 in project's build.gradle:

dependencies {
    ...
    implementation "com.google.firebase:firebase-messaging:15.0.2"
    ...
}

And then in app's build.gradle I had to update google-services from 3.1.1 to 3.3.0:

dependencies {
    ...
    classpath 'com.google.gms:google-services:3.3.0'
    ...
}

这篇关于更新后的错误play-services“程序类型已经存在:com.google.android.gms.internal.measurement.zzabo”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆