Reputation: 1184
I'm trying to integrate Google's Firebase SDK as explained here
But I'm getting this error when I try to build the project:
Gradle sync failed: Version: 8.4.0 is lower than the minimum version (9.0.0) required for google-services plugin.
This is my project's build.gradle
file :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
and this is app's build.gradle
file:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
lintOptions {
abortOnError false
}
signingConfigs {
release {
}
}
compileSdkVersion Integer.parseInt(project.COMPILE_SDK_VERSION)
buildToolsVersion project.BUILD_TOOLS_VERSION
defaultConfig {
applicationId 'club.androidy.callcontrolfree'
minSdkVersion project.MIN_SDK
targetSdkVersion project.TARGET_SDK_VERSION
versionName project.VERSION_NAME
versionCode Integer.parseInt(project.VERSION_CODE)
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:design:23.3.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.google.firebase:firebase-core:9.0.0'
compile 'com.google.firebase:firebase-crash:9.0.0'
}
apply plugin: 'com.google.gms.google-services'
What's wrong here?
Thanks in advance.
Upvotes: 15
Views: 13754
Reputation: 569
I am updating google play services to 3.0.0 in gradle file.
I have to must change the dependies to 9.0.0 version else "Gradle sync failed: Version: 8.4.0 is lower than the minimum version (9.0.0) required for google-services plugin" will come
because the gradle build compiled with older version of dependies so I need to update to 9.0.0 version like ...
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
need to add at the bottom of app.gradle file
apply plugin: 'com.google.gms.google-services'
In project gradle file
classpath 'com.google.gms:google-services:3.0.0'
Upvotes: 2
Reputation: 363469
As you are using
classpath 'com.google.gms:google-services:3.0.0'
You have to use the version 9.0.0 of the google play service.
Change your dependencies:
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-analytics:9.0.0'
Upvotes: 39