Error after upgrade Google Play Services to 11.0.0 version

前端 未结 6 695
[愿得一人]
[愿得一人] 2021-01-11 11:56

I have a strange issue. After uploading Google Play Services library from version 10.2.6 to version 11.0.0, when i try to compile I get this error:

Er

相关标签:
6条回答
  • 2021-01-11 12:13

    Use play Service Version 12.0.0 and

    in project level gradle use classpath 'com.google.gms:google-services:3.1.0'

    EDIT Answer updated to latest version

    0 讨论(0)
  • 2021-01-11 12:20

    After a major update of Android Studio, clean an rebuild your project.Better You can use version 10.

    0 讨论(0)
  • 2021-01-11 12:24

    You probably all ready fixed the issue, but updating Firebase plugin also to 11.0.1 fixed the problem for me.

    0 讨论(0)
  • 2021-01-11 12:24

    Try targeting directly the required servies like if you want to get SmsRetriver compile

    compile 'com.google.android.gms:play-services-auth-api-phone:11.0.1'
    

    Rather Than

    compile 'com.google.android.gms:play-services:11.0.1'
    
    0 讨论(0)
  • 2021-01-11 12:30

    You should delete the line apply plugin: 'com.google.gms.google-services'

    Because apply plugin: 'com.android.application' already has same package.

    That's where the conflict arises.

    UPDATE:

    Use Play services version 11.0.1

    0 讨论(0)
  • 2021-01-11 12:30

    What worked for me was the following

    Project Gradle

    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.2'
        classpath 'com.google.gms:google-services:3.0.0'
    

    App Gradle

    compileSdkVersion 26
    buildToolsVersion '26.0.0'
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 26
        multiDexEnabled = true
    }
    

    dependencies

    //    compile 'com.crittercism:crittercism-android-agent:+'
    compile project(':paymentGatewayCommons')
    compile project(':paypal')
    compile project(':paytm')
    compile project(':payu')
    compile 'com.fasterxml.jackson.core:jackson-core:2.9.0.pr1'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.0.pr1'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services:11.0.1'
    compile 'com.google.android.gms:play-services-base:11.0.1'
    //compile 'com.google.android.gms:play-services-appindexing:11.0.1'
    //compile 'com.google.android.gms:play-services-contextmanager:11.0.1'
    compile 'com.google.android.gms:play-services-places:11.0.1'
    compile 'com.google.android.gms:play-services-nearby:11.0.1'
    compile 'com.google.android.gms:play-services-maps:11.0.1'
    compile 'com.google.android.gms:play-services-ads:11.0.1'
    compile 'com.google.android.gms:play-services-auth:11.0.1'
    compile 'com.google.android.gms:play-services-gcm:11.0.1'
    compile 'com.google.android.gms:play-services-analytics:11.0.1'
    compile 'com.google.android.gms:play-services-location:11.0.1'
    compile 'com.google.maps.android:android-maps-utils:0.4.+'
    compile 'com.google.zxing:core:3.2.0'
    compile 'com.journeyapps:zxing-android-embedded:3.3.0@aar'
    compile 'com.google.firebase:firebase-messaging:11.0.1'
    compile 'com.google.firebase:firebase-core:11.0.1'
    compile 'com.google.firebase:firebase-analytics:11.0.1'
    compile 'com.flurry.android:analytics:6.4.2'
    compile 'com.android.support.constraint:constraint-layout:+'
    testCompile 'junit:junit:4.12'
    
    0 讨论(0)
提交回复
热议问题