Error "File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it"
Error "File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it"
Question
I updated my project to the latest Play services classpath 'com.google.gms:google-services:1.5.0-beta2'
. I am also using the latest version of playservices in my app.gradle file as:
compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
However when I compile, Gradle throws exception as follows
Error:Execution failed for task ':app:processDebugGoogleServices'. > File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.
Accepted Answer
You need to get the configuration file from the developer's site and paste it in the app level directory of your project.
Update:
Goto
Select your project
On the left menu, click on settings > project settings
Add an app or download the google-services.json file under the Your Apps section.
Popular Answer
Please go to this URL :
https://developers.google.com/mobile/add
Choose your Options and finally you will be able to download
google-service.json
file
copy that file and paste it Into
YourProjectName/app
Directory
Then recompile the project Most probably it will fly
In my case the project directory looks like this :
Read more... Read less...
For anyone using Firebase you need to go into your console and there it should say "add project to Android". From there, it will step-by-step generate the google-services.json file for you.
I received this error while trying to run Google's Firebase analytics sample app:
Prerequisites:
- Download https://github.com/firebase/quickstart-android
- Add quickstart/analytics to Android Studio
Add Procedure:
- Go to https://firebase.google.com/
- Click on "GO TO CONSOLE"
- Click on "Add Project"
- Project name: Enter: sample-app
- Click "Create Project" [Takes about 10 seconds or so...]
- Click "Continue"
- On the "Getting Started" page, click "Add Firebase to your Android app"
- Enter package name for the android app [The full package name appears at the top of the manifest: "com.google.firebase.quickstart.analytics"]
- Click on download google-services.json
- In file explorer, add google-services.json to the directory: "quickstart/analytics/app" [Warning: Do not rename the file, it must be: google-services.json]
- Run 'app'
- The sample app already contains the necessary Gradle file settings.
- When adding a new project do: Tools -> Firebase -> Analytics -> Add Event -> Connect App to Firebase.
- Adding a project via Android Studio ensures that all the Gradle Dependecies are setup.
Remove Procedure:
- Go to https://firebase.google.com/
- Click on "GO TO CONSOLE"
- Settings -> Project Settings -> Delete this App
- Settings -> Project Settings -> Delete Project
- Enter project ID and press delete
I added and removed the sample app multiple times without any noticeable side effects.
in my case i have saved a json file with a space like this
google-services .json
and the right one is
google-services.json
and also take care you do not put (_) instead of (-)
may help some one.
I just run into problem downloading google-services.json
from Firebase console. Turns out I had to log out from all other google accounts than the one I was using for Firebase.
You must go on Firebase console-->Settings-->Project Settings and there will be section with Download the latest config file. Download google-service.json and put into app folder. It's work for me. Links: https://developers.google.com/identity/sign-in/android/start-integrating https://developers.google.com/android/guides/client-auth