Where is GMS plugin compatible with compile 'com.google.android.gms:play-services-appindexing:9.4.0'

1,484 views
Skip to first unread message

Joe White

unread,
Aug 3, 2016, 3:59:16 PM8/3/16
to Firebase Google Group
When I attempt to upgrade my build file from v9.2.1 to v9.4.0
old: compile 'com.google.android.gms:play-services-appindexing:9.2.1'
new compile 'com.google.android.gms:play-services-appindexing:9.4.0' 
 
I get an error message indicating that the GMS plugin is not up-to-date.  What should I change to get a compatible version?
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 9.2.1.
The module build.gradle file closes with

apply plugin: 'com.google.gms.google-services'
and I have 
classpath 'com.google.gms:google-services:3.0.0'
in the project build.gradle file.  There does not seem to be a later version.

Samuel Stern

unread,
Aug 4, 2016, 4:50:59 PM8/4/16
to Firebase Google Group
Hey Joe,

This is very strange to me, I have been successfully using 3.0.0 with the 9.4.0 libs no problem.  Could you share your whole build.gradle?

- Sam

This message (and any associated files) may contain VelociKey confidential and/or privileged information. If you are not the intended recipient or authorized to receive this for the intended recipient, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by sending a reply e-mail and delete this message. Thank you for your cooperation.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/d80efca7-f5b1-4d45-b98d-b3443d774042%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joe White

unread,
Aug 5, 2016, 8:25:21 PM8/5/16
to Firebase Google Group
Here is the build gradle file (note, if I do NOT use the closing plugin, there is no error
apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"
    defaultConfig {
        applicationId "com.velocikey.android.todoapp"
        minSdkVersion 23
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'

    compile 'com.android.support:appcompat-v7:24.1.1'
    compile 'com.android.support:recyclerview-v7:24.1.1'
    compile 'com.android.support:cardview-v7:24.1.1'

    // Design helpers
    compile 'com.android.support:design:24.1.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'

    // Firebase versions
    compile 'com.firebaseui:firebase-ui-database:0.4.3'
    compile 'com.google.firebase:firebase-core:9.2.1'
    compile 'com.google.firebase:firebase-auth:9.2.1'
    compile 'com.google.firebase:firebase-database:9.2.1'
    compile 'com.google.android.gms:play-services-appindexing:9.2.1'
    // error if using compile 'com.google.android.gms:play-services-appindexing:9.4.0'
}

apply plugin: 'com.google.gms.google-services'
// note: no problem if the above line is omitted and appindexing 9.4.0 is selected
 



Samuel Stern

unread,
Aug 5, 2016, 9:42:39 PM8/5/16
to Firebase Google Group

Ah ok I think here's the issue.  So the plugin decides what version of gms/Firebase you're using by reading your dependencies block, but it stops at the first one which is 9.2.1 in this case.   But then you're adding app indexing 9.4.0, and mixing versions can product a conflict.  Try updating all of the 9.2.1 dependencies to 9.4.0, and update the FirebaseUI dependency to 0.4.4 to match.  I think that'll make it all work.

And yes, I agree, that's a lot of version numbers to keep track of 😉

- Sam


This message (and any associated files) may contain VelociKey confidential and/or privileged information. If you are not the intended recipient or authorized to receive this for the intended recipient, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by sending a reply e-mail and delete this message. Thank you for your cooperation.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Joe White

unread,
Aug 6, 2016, 12:18:06 AM8/6/16
to Firebase Google Group
That did it.

However, why does Android Studio "warn" me that the 
compile 'com.google.android.gms:play-services-appindexing:9.2.1'
is out of date (and that v9.4.0 is available), but has NO indication that the later version for firebase elements is available?
compile 'com.firebaseui:firebase-ui-database:0.4.3'
compile 'com.google.firebase:firebase-core:9.2.1'
compile 'com.google.firebase:firebase-auth:9.2.1'
compile 'com.google.firebase:firebase-database:9.2.1'e

Where can I find the "most recent" version (I hate to have to keep going to many diifferent non-listed web sites to try to figure out what is available). 

Samuel Stern

unread,
Aug 6, 2016, 11:44:52 AM8/6/16
to Firebase Google Group

Glad that worked! I'm pretty sure Android Studio is just looking for 'com.google.android.gms' when trying to tell you what's out of date.

For now the latest version number of the play services libraries is always the same as the latest version of the Firebase libraries, and you should always try to keep them in sync.

- Sam


This message (and any associated files) may contain VelociKey confidential and/or privileged information. If you are not the intended recipient or authorized to receive this for the intended recipient, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by sending a reply e-mail and delete this message. Thank you for your cooperation.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Samuel Stern

unread,
Aug 6, 2016, 11:46:15 AM8/6/16
to Firebase Google Group

Also I flagged this issue on the Android Studio bug tracker a little while back if you'd like to follow along:

https://code.google.com/p/android/issues/detail?id=215384

- Sam

Reply all
Reply to author
Forward
0 new messages