1

I'm having a weird issue with Google Login and Google Play services. I followed the instructions here https://developers.google.com/identity/sign-in/android/start-integrating and added 'com.google.gms:google-services:1.5.0-beta2' to my build.gradle file.

I then added these play services libraries that we need for our app in the app's gradle file:

compile 'com.google.android.gms:play-services-location:8.4.0' compile 'com.google.android.gms:play-services-maps:8.4.0' compile 'com.google.android.gms:play-services-fitness:8.4.0' compile 'com.google.android.gms:play-services-analytics:8.4.0' compile 'com.google.android.gms:play-services-auth:8.4.0'

But when I compile I get this error:

  • What went wrong: 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 8.3.0.

  • Found com.google.android.gms:play-services-fitness:8.4.0, but version 8.3.0 is needed for the google-services plugin.

What confuses me is that the developer docs say to use version 1.5.0-beta2 plugin and version 8.4 play services but gradle will not let me compile.

Shmuel
  • 3,916
  • 2
  • 27
  • 45
  • Here is solution from google official app: - app gradle: https://github.com/googlesamples/google-services/blob/master/android/signin/app/build.gradle - project gradle: https://github.com/googlesamples/google-services/blob/master/android/signin/build.gradle – Trung Jan 16 '16 at 22:04

1 Answers1

3

This post here has the answer Version conflict updating to 8.4.0

I needed two things,

classpath 'com.android.tools.build:gradle:2.0.0-alpha5'

classpath 'com.google.gms:google-services:2.0.0-alpha5'

and to move apply plugin: 'com.google.gms.google-services' to the end of the file

Shmuel
  • 3,916
  • 2
  • 27
  • 45