Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed

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?

like image 683
Bakus123 Avatar asked Nov 06 '15 08:11

Bakus123


People also ask

What are basement play services?

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 .


2 Answers

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.

like image 188
Jeff Sutton Avatar answered Sep 23 '22 13:09

Jeff Sutton


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...

like image 20
mtrakal Avatar answered Sep 24 '22 13:09

mtrakal