Romain Barbier
Romain Barbier

Reputation: 208

ERROR: File google-services.json is missing. (Since com.google.gms:google-services updated from 4.2.0 to 4.3.0)

Since I updated com.google.gms:google-services from version 4.2.0 to 4.3.0 in my top level build.gradle, I cannot compile my project any more because I have the error :

"File google-services.json is missing"

My google-services.json are in :

(for example)

When my version is 4.2.0, I have no issue but in 4.3.0 I have the error and the Searched Location is: /My/personnal/project/app/google-services.json

not working

dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'com.google.gms:google-services:4.3.0'
    }

working

dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'com.google.gms:google-services:4.2.0'
    }

EDIT 1

Looks like it has been resolved with version 4.3.1

EDIT 2

Looks like issue is back on version 4.3.2 :(

EDIT 3

Issue still there with 4.3.3 :(

Upvotes: 9

Views: 978

Answers (3)

Subin S V
Subin S V

Reputation: 85

There is already an open issue on github based on this

https://github.com/google/play-services-plugins/issues/91

The problem is google-services plugin ignores the build variant if it starts with a capital letter.

If you refactor the build variant names to camelCase, then it seems to detect the google-services.json file.

Upvotes: 2

Sabin Bajracharya
Sabin Bajracharya

Reputation: 259

Add this line at the bottom of your app build.gradle file and not at the top.

apply plugin: 'com.google.gms.google-services'

Upvotes: 0

Riyasa Mansil
Riyasa Mansil

Reputation: 190

You need to get the configuration file from the developer's site and paste it in the app level directory of your project. Generate file here developers.google.com/mobile/add

Upvotes: -1

Related Questions