I just updated Google play services to the latest release - 23 - in the Android SDK Manager. Next I updated dependency in my project to: com.google.android.gms:play-services-gcm:8.3.0
But I got:
Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed :app:processDebugGoogleServices FAILED Error:Execution failed for task ':app:processDebugGoogleServices'. > Please fix the version conflict.
What is wrong? Do you have this problem also?
The library play-services-basement is a dependency of play-services-base . It was introduced in Google Play Service version 8.1. 0 to help to reduce the size of some other libraries like play-services-ads and play-services-analytics .
In your top-level build.gradle file you need to update the dependencies to use
classpath 'com.google.gms:google-services:1.5.0-beta2'
Extra Info: The latest version of this can be found by looking at the entry on JFrog Bintray
Further Update: Yes this has been updated since I answered the question. The latest version is:
classpath 'com.google.gms:google-services:3.0.0'
However, it's always worth following the provided link to find the latest version.
Working solution for 8.4.0 (maybe same for previous versions too with this crazy issue)
project build.gradle:
dependencies { classpath 'com.android.tools.build:gradle:2.1.2' classpath 'com.google.gms:google-services:2.1.2' }
app/mobile build.gradle
apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'android-apt' android { ... ... ... } dependencies { // Google Play Services compile 'com.google.android.gms:play-services-analytics:8.4.0' // another play services in v8.4.0 } apply plugin: 'com.google.gms.google-services' // why here on end? Because GOOGLE...
WARNING: When you move apply plugin: 'com.google.gms.google-services'
on top of build gradle, it can not compile...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With