user6334495
user6334495

Reputation: 73

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

Upvotes: 4

Views: 9328

Answers (3)

Vinoth
Vinoth

Reputation: 9734

To download a google-service.json for an Android app:

  • Sign in to Firebase and open your project.
  • Click and select Project settings.
  • In the Your apps card, select the package name of the app you need a config file for from the list.
  • Click google-services.json.

and then paste the google-services.json file to your project’s app folder

Upvotes: 0

Malachi
Malachi

Reputation: 2453

mikewee's answer didn't work for me, since I had already gone through the migration to firebase process.

Instead, the instructions here will get you a google-services.json: https://support.google.com/firebase/answer/7015592?hl=en

Upvotes: 4

gatteo
gatteo

Reputation: 1382

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.

Upvotes: 7

Related Questions