Error after upgrade Google Play Services to 11.0.0 version

Mattia Ruggiero

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:

Error:Execution failed for task ':app:processDebugGoogleServices'. Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.0.0.

I visited the link mentioned in the error and the last version of the google-services plugin seems to be 3.1.0, ie the version i am using, and i have already upgraded all the play services libraries to 11.0.0 version. What can I do to compile my code with 11.0.0 version of GMS?

Here's my build.gradle file (module scope):

apply plugin: 'com.android.application'
apply plugin: 'realm-android'

android {

    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 23
        versionName "0.7.3.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        manifestPlaceholders = [onesignal_app_id               : "12345678-1234-1234-1234-123456789",
                            // Project number pulled from dashboard, local value is ignored.
                            onesignal_google_project_number: "REMOTE"]
        multiDexEnabled true
    }
    buildTypes {

        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    productFlavors {
        prontopro {
            applicationId "com.example.app"
            buildConfigField "boolean", "TEST_ENVIRONMENT", "false"
        }

        prontoproTest {
            applicationId "com.example.app"
            buildConfigField "boolean", "TEST_ENVIRONMENT", "true"
        }
    }

    dataBinding {
        enabled = true
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.google.android.gms:play-services-places:11.0.0'
    compile 'com.google.android.gms:play-services-location:11.0.0'
    compile 'org.parceler:parceler-api:1.1.6'
    annotationProcessor 'org.parceler:parceler:1.1.6'
    annotationProcessor 'com.android.databinding:compiler:2.2.2'
    compile 'com.viewpagerindicator:library:2.4.1'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.2'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.github.chrisbanes:PhotoView:1.2.6'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'io.realm:android-adapters:2.0.0'
    compile 'com.google.firebase:firebase-crash:10.2.6'
    //reactive libraries
    compile 'io.reactivex:rxandroid:1.2.1'
    compile 'io.reactivex:rxjava:1.2.3'
    compile 'com.jakewharton.rxbinding:rxbinding:1.0.0'
    compile 'com.jakewharton.rxbinding:rxbinding-support-v4:1.0.0'
    compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:1.0.0'
    compile 'com.jakewharton.rxbinding:rxbinding-design:1.0.0'
    compile 'com.jakewharton.rxbinding:rxbinding-recyclerview-v7:1.0.0'
    compile 'com.tbruyelle.rxpermissions:rxpermissions:0.8.2@aar'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
    compile 'com.github.pwittchen:reactivenetwork:0.8.0'
    compile 'com.hwangjr.rxbus:rxbus:1.0.5'
    compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2'
    //testing
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'
    testCompile 'org.mockito:mockito-core:2.6.3'
    //onesignal
    compile 'com.onesignal:OneSignal:3.4.4@aar'
    compile "com.mixpanel.android:mixpanel-android:5.1.0"
    compile 'com.google.android.gms:play-services-gcm:11.0.0'
}
apply plugin: 'com.google.gms.google-services'

And finally here's my build.gradle file (app scope):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.2'
        classpath 'io.realm:realm-gradle-plugin:3.1.4'
        classpath 'com.google.gms:google-services:3.1.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url "http://dl.bintray.com/populov/maven" }
        maven { url "https://jitpack.io" }
        mavenCentral()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
dustblue

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

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Error in using Google Play Services

分類Dev

Google Play Services Version for Android Studio

分類Dev

Cannot resolve google play services version 15.0.2

分類Dev

Google Play Services Library Error onesignal

分類Dev

Google Play Services version 5.2.08 too recent for my device

分類Dev

Google Play Services - Google login yields a network error

分類Dev

After upgrading to google play services 8.4.0 my app crashes on startup

分類Dev

wlan0 interface disappeared after upgrade to ubuntu 15.10

分類Dev

Reviewboard not assigning default reviewers after upgrade from 1.7.6-0 to 2.0.5-0

分類Dev

Error: fix the version conflict (google-services plugin)

分類Dev

Fake/mock Google Play Services

分類Dev

How do I know what the latest version of Google Play Services is for Android Studio?

分類Dev

Attempting to use Google Play Services, Google Sign in, keep getting an Error Code 10

分類Dev

Google Play Game Services VS Google Drive

分類Dev

I´m getting the following error from Play Console and I can´t edit the version or the Google play info

分類Dev

エラー:リソースinteger / google_play_services_version(別名app:integer / google_play_services_version)が見つかりません

分類Dev

intellijのシンボル@ integer / google_play_services_versionを解決できません

分類Dev

Android:LocationManagerとGoogle Play Services

分類Dev

Retrieve leaderboard position in Google play game services

分類Dev

How to remove Google Play Services from GenyMotion?

分類Dev

How does NodeAPI in Google Play Services work?

分類Dev

How to specify google play services dependency in maven

分類Dev

google dev_appserver throws error 'python2: command not found' after upgrade to python 3.7

分類Dev

Server: No login prompt after upgrade, some services not starting

分類Dev

Android google services plugin version conflict

分類Dev

Getting error after implement 'com.google.firebase:firebase-core:17.0.0' and apply plugin: 'com.google.gms.google-services'

分類Dev

How set the correct version of play-services in Ionic Pro

分類Dev

got error " The "RazorGenerate" task failed unexpectedly. " .After Updating to VS 16.8 and upgrade to .net 5.. the core version target is Core 2.2

分類Dev

Android Development - Google Play Services, Google Login Integration

Related 関連記事

  1. 1

    Error in using Google Play Services

  2. 2

    Google Play Services Version for Android Studio

  3. 3

    Cannot resolve google play services version 15.0.2

  4. 4

    Google Play Services Library Error onesignal

  5. 5

    Google Play Services version 5.2.08 too recent for my device

  6. 6

    Google Play Services - Google login yields a network error

  7. 7

    After upgrading to google play services 8.4.0 my app crashes on startup

  8. 8

    wlan0 interface disappeared after upgrade to ubuntu 15.10

  9. 9

    Reviewboard not assigning default reviewers after upgrade from 1.7.6-0 to 2.0.5-0

  10. 10

    Error: fix the version conflict (google-services plugin)

  11. 11

    Fake/mock Google Play Services

  12. 12

    How do I know what the latest version of Google Play Services is for Android Studio?

  13. 13

    Attempting to use Google Play Services, Google Sign in, keep getting an Error Code 10

  14. 14

    Google Play Game Services VS Google Drive

  15. 15

    I´m getting the following error from Play Console and I can´t edit the version or the Google play info

  16. 16

    エラー:リソースinteger / google_play_services_version(別名app:integer / google_play_services_version)が見つかりません

  17. 17

    intellijのシンボル@ integer / google_play_services_versionを解決できません

  18. 18

    Android:LocationManagerとGoogle Play Services

  19. 19

    Retrieve leaderboard position in Google play game services

  20. 20

    How to remove Google Play Services from GenyMotion?

  21. 21

    How does NodeAPI in Google Play Services work?

  22. 22

    How to specify google play services dependency in maven

  23. 23

    google dev_appserver throws error 'python2: command not found' after upgrade to python 3.7

  24. 24

    Server: No login prompt after upgrade, some services not starting

  25. 25

    Android google services plugin version conflict

  26. 26

    Getting error after implement 'com.google.firebase:firebase-core:17.0.0' and apply plugin: 'com.google.gms.google-services'

  27. 27

    How set the correct version of play-services in Ionic Pro

  28. 28

    got error " The "RazorGenerate" task failed unexpectedly. " .After Updating to VS 16.8 and upgrade to .net 5.. the core version target is Core 2.2

  29. 29

    Android Development - Google Play Services, Google Login Integration

ホットタグ

アーカイブ