1

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 Error "File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it" but it isn't my probleme because my file is at the good place.

ps : And sorry for my bad english ;p

Community
  • 1
  • 1
boblinux
  • 105
  • 2
  • 2
  • 10

2 Answers2

2

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

santoshdhraj
  • 415
  • 3
  • 8
-2

download google-service.json file copy that file and paste it Into YourProjectName/app Directory

Makvin
  • 3,475
  • 27
  • 26