user6334495 user6334495 - 1 month ago 5
Android Question

File google-services.json is missing, but what services?

I'm facing issues when using one of the new Firebase features which came out a few days ago. My application has used Firebase before, but now I want to add the storage feature. Therefore I added the dependency to my gradle file:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.firebase:firebase-client-android:2.5.2+'
compile 'com.firebase:geofire:1.1.0+'
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.google.firebase:firebase-storage:9.0.0' }


Below I added:

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


As I haven't used the plugin for google-services before, I am missing the google-servies.json file. As noted here https://developers.google.com/android/guides/google-services-plugin#troubleshooting I am supposed to get this file from google by specifying the services the app uses. However, I only use the Places API, while I can only specify "Sign-In", "Cloud Messaging", "Analytics", "App Invites" and "Ad Mob" here: https://developers.google.com/mobile/add

Answer

if you go to this link "https://console.firebase.google.com/project/yourprojectname/overview" when already logged in, you will see a button saying "Add Firebase to your Android app". Click on it and a popup will show up. On step 2 it will give you a download link for the google-servies.json file. Follow the steps and you're done.

Comments