Android gradle apply plugin com.google.gms.google-services <p>I have a big issue with the plugin to use the google-service.json on my android application.</p> <p>I have follow the guide on the firebase wiki but when i try to sync my project i got this error : </p> <blockquote> <p>Error:(189, 1) A problem occurred evaluating project ':app'. Failed to apply plugin [id 'com.google.gms.google-services'] Cannot invoke method all() on null object</p> </blockquote> <p>In my gradle root i have add this in the dependencies module : </p> <blockquote> <p>classpath 'com.google.gms:google-services:3.0.0'</p> </blockquote> <p>In my app module build.gradle i have this at the bottom of the file : </p> <blockquote> <p>apply plugin: 'com.google.gms.google-services'</p> </blockquote> <p>I have also tried to compile this dependencie on the app build.gradle : </p> <blockquote> <p>com.google.android.gms:play-services:9.8.0</p> </blockquote> <p>But nothing can make this work.</p> <p>Thanks for your help !</p> <p>Root gradle : </p> <pre><code>buildscript { ext.kotlin_version = '1.0.4' repositories { jcenter() maven { url 'https://plugins.gradle.org/m2/' } maven { url nexus_url } } dependencies { classpath 'com.android.tools.build:gradle:2.2.2' classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.5.4' classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1' classpath 'com.google.gms:google-services:3.0.0' } } subprojects { repositories { mavenLocal() jcenter() maven { url 'https://jitpack.io' } maven { url 'http://dl.bintray.com/android10/maven' } maven { url 'http://dl.bintray.com/tbruyelle/tbruyelle' } maven { url nexus_url } } apply from: "$rootDir/dependencies.gradle" } </code></pre> <p>App gradle : </p> <pre><code> apply plugin: 'com.android.application' def appName = '...' def baseVersionName = '1.0' android { compileSdkVersion android.compileSdk buildToolsVersion android.buildTools defaultConfig { applicationId '...' minSdkVersion android.minSdk targetSdkVersion android.targetSdk versionCode 1 versionName baseVersionName // Filter non-french resources provided by third-party libraries resConfigs 'en', 'fr' } signingConfigs { ... } buildTypes { ... } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } lintOptions { lintConfig file('lint.xml') } /** * One flavor / backend. On debug and candidate builds, the backend in use is shown * by a colored pastille on the launcher icon and on the footer: * red -&gt; production * orange -&gt; qa * white -&gt; it (AKA customer dev) * blue -&gt; dev */ productFlavors { ... } variantFilter { variant -&gt; ... } } dependencies { compile project(':domain') compile project(':data') compile dep.googlePlayServices compile mlibs.common compile mlibs.droidutils compile mlibs.rxutils compile mlibs.mvp compile dep.appCompat compile dep.cardview compile dep.design compile dep.recyclerView compile dep.supportAnnotations compile dep.supportFragment compile dep.firebaseCore compile dep.butterknife annotationProcessor dep.butterknifeCompiler compile dep.dagger annotationProcessor dep.daggerCompiler provided dep.jsr250 compile dep.kotlin compile dep.rxandroid compile dep.rxjava compile dep.rxpermissions testCompile testDep.assertj testCompile testDep.junit testCompile testDep.robolectric testCompile testDep.mockito debugCompile dep.stetho debugCompile dep.stetho_okhttp3 } apply plugin: 'com.google.gms.google-services' </code></pre>