Reputation: 1037
I want to update each lib in my project. Right now my grade looks like this :
compile "com.google.android.gms:play-services-base:15.0.1"
compile "com.google.android.gms:play-services-ads:15.0.1"
compile "com.google.android.gms:play-services-location:15.0.1"
compile "com.google.android.gms:play-services-identity:15.0.1"
compile "com.google.android.gms:play-services-analytics:15.0.1"
compile "com.google.android.gms:play-services-gcm:15.0.1"
compile "com.google.android.gms:play-services-maps:15.0.1"
compile 'com.google.android.gms:play-services-auth:15.0.1'
compile 'com.google.firebase:firebase-core:15.0.1'
And I'm getting error :
Failed to resolve: com.google.android.gms:play-services-analytics:15.0.1
When you check you can see that latest version of analytics service is 16.0.1. So I change grade like this :
compile "com.google.android.gms:play-services-base:15.0.1"
compile "com.google.android.gms:play-services-ads:15.0.1"
compile "com.google.android.gms:play-services-location:15.0.1"
compile "com.google.android.gms:play-services-identity:15.0.1"
**compile "com.google.android.gms:play-services-analytics:16.0.1"**
compile "com.google.android.gms:play-services-gcm:15.0.1"
compile "com.google.android.gms:play-services-maps:15.0.1"
compile 'com.google.android.gms:play-services-auth:15.0.1'
**compile 'com.google.firebase:firebase-core:16.0.1'**
I'm getting error :
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 15.0.1.
Maybe you know how can I fix this ?
Upvotes: 0
Views: 1405
Reputation: 6426
You need to update your google services
lib too. Go to your main App's gradle
file and make sure it looks something like this:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Upvotes: 1