更新播放服务后出现错误“程序类型已存在:com.google.android.gms.internal.measurement.zzabo”

时间:2021-05-09 18:56:50

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

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

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)}

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

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

在构建应用程序时。这是我的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'

5 个解决方案

#1


9  

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

就我而言,我必须在项目的build.gradle中将Firebase从版本15.0.0更新到15.0.2:

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:

然后在app的build.gradle中我不得不将google-services从3.1.1更新到3.3.0:

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

#2


5  

You can try using the exact version number following this link:

您可以尝试使用此链接后的确切版本号:

https://firebase.google.com/support/release-notes/android#latest_sdk_versions

https://firebase.google.com/support/release-notes/android#latest_sdk_versions

SDK Update - May 2, 2018 - Firebase Android SDKs now have independent version numbers, allowing for more frequent, flexible updates.

SDK更新 - 2018年5月2日 - Firebase Android SDK现在具有独立的版本号,允许更频繁,灵活的更新。

#3


1  

I faced the same problem today. Google comes with the new release on 02 may 2018.

我今天遇到了同样的问题。谷歌将于2018年5月2日发布新版本。

Please go to the link and set the version no according to the doc:

请转到链接并根据文档设置版本号:

https://firebase.google.com/support/release-notes/android#20180502

https://firebase.google.com/support/release-notes/android#20180502

for e.g.

例如

Firebase Core com.google.firebase:firebase-core:15.0.2

Firebase Core com.google.firebase:firebase-core:15.0.2

#4


0  

Try using firebase libs version 15.0.2 or higher instead. Also clean your project ./gradlew clean, as well as kill your Gradle daemons: ./gradlew --stop

请尝试使用firebase libs 15.0.2或更高版本。还要清理你的项目./gradlew clean,以及杀死你的Gradle守护进程:./ gradlew --stop

#5


0  

1.Update all the firebase libs according to this release page.

1.根据此版本页面更新所有firebase库。

2.Update google location and google map service to 15.0.1.

2.将谷歌位置和谷歌地图服务更新为15.0.1。

implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'

#1


9  

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

就我而言,我必须在项目的build.gradle中将Firebase从版本15.0.0更新到15.0.2:

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:

然后在app的build.gradle中我不得不将google-services从3.1.1更新到3.3.0:

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

#2


5  

You can try using the exact version number following this link:

您可以尝试使用此链接后的确切版本号:

https://firebase.google.com/support/release-notes/android#latest_sdk_versions

https://firebase.google.com/support/release-notes/android#latest_sdk_versions

SDK Update - May 2, 2018 - Firebase Android SDKs now have independent version numbers, allowing for more frequent, flexible updates.

SDK更新 - 2018年5月2日 - Firebase Android SDK现在具有独立的版本号,允许更频繁,灵活的更新。

#3


1  

I faced the same problem today. Google comes with the new release on 02 may 2018.

我今天遇到了同样的问题。谷歌将于2018年5月2日发布新版本。

Please go to the link and set the version no according to the doc:

请转到链接并根据文档设置版本号:

https://firebase.google.com/support/release-notes/android#20180502

https://firebase.google.com/support/release-notes/android#20180502

for e.g.

例如

Firebase Core com.google.firebase:firebase-core:15.0.2

Firebase Core com.google.firebase:firebase-core:15.0.2

#4


0  

Try using firebase libs version 15.0.2 or higher instead. Also clean your project ./gradlew clean, as well as kill your Gradle daemons: ./gradlew --stop

请尝试使用firebase libs 15.0.2或更高版本。还要清理你的项目./gradlew clean,以及杀死你的Gradle守护进程:./ gradlew --stop

#5


0  

1.Update all the firebase libs according to this release page.

1.根据此版本页面更新所有firebase库。

2.Update google location and google map service to 15.0.1.

2.将谷歌位置和谷歌地图服务更新为15.0.1。

implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'