1
votes

I follow this tutorials i do everything from there . when i apply plugin

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

Error:Execution failed for task ':app:processDebugGoogleServices'. File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: /home/deadlydragger/AndroidStudioProjects/FirebaseExample/app/src/debug/google-services.json /home/deadlydragger/AndroidStudioProjects/FirebaseExample/app/google-services.json

this happen . But while i am importing same project from github it works well .Whats the issue behind this ? i place google-services.json in app directory .

1
File google-service.json is needed. You have to access your Firebase Console to generate one. Once you generate the file, place it in the root folder of your main module. - Glenn
I already put google-service.json file inside app directory . But still happening this error . this is my dependencies compile 'com.google.firebase:firebase-messaging:9.0.2' classpath 'com.google.gms:google-services:3.0.0' and i apply this in bottom of grandle apply plugin: 'com.google.gms.google-services' - Dinesh Rijal
did you paste it in project directory or in project\app directory ? - M.Waqas Pervez
project / app directory - Dinesh Rijal
Could you add your full project and app level gradle files? The error you are seeing is likely that your google-services.json file is in the wrong location. From the error /home/deadlydragger/AndroidStudioProjects/FirebaseExample/app/google-services.json does not exist. - Arthur Thompson

1 Answers

0
votes

Have you checked that you included the google-service:3.0.0 dependencies in Top-level build file not the App-level build file ? The dependencies is shown below:

classpath 'com.google.gms:google-services:3.0.0'