boblinux boblinux - 9 months ago 57
Android Question

File google-services.json is missing from module root folder (but it is at the good place ! )

I try to use google sign in in my android app, i read the page https://developers.google.com/identity/sign-in/android/start-integrating and i made all steps, now i put my google-services.json in my app folder, and after downloading the google-services.json, i do :

mv Dowloads/google-services.json AndroidStudioProjects/MyApplication/app/


so, when i do :

ls AndroidStudioProjects/MyApplication/app/
app.iml build build.gradle google-services.json libs proguard-rules.pro src


My file google-services.json seems to be at the good place,but gradle console displays an error :

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


I read File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.[PLAY-SERVICES] but it isn't my probleme because my file is at the good place.

ps : And sorry for my bad english ;p

Answer Source

You also need to add these line of codes in Gradle files if you haven't already. In Module:app_name gradle file, add

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

on top of the file. And in dependencies of the same file, add

compile 'com.google.android.gms:play-services:8.3.0'

Also, in Project:project_name gradle file, add

classpath 'com.google.gms:google-services:2.0.0-alpha2'

in dependencies

Also, try to upload a screenshot of the stack trace if this doesn't repair your problem