Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle sync failed: Version: 8.4.0 is lower than the minimum version (9.0.0) required for google-services plugin

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.

like image 857
Mohammad Avatar asked May 19 '16 15:05

Mohammad


People also ask

Where to put the Google services JSON file?

The google-services. json file is generally placed in the app/ directory (at the root of the Android Studio app module).

What is com Google GMS Google services?

Google's most popular apps, all in one place Google Mobile Services (GMS) is a collection of Google applications and APIs that help support functionality across devices.


1 Answers

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'
like image 130
Gabriele Mariotti Avatar answered Sep 16 '22 14:09

Gabriele Mariotti