2

I am using firebase database in android project, to place google-services.json file, I am following this

But I am getting following error:

File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it

I have created two folders, one for development and another for testing environment. I have two different databases for each. So I need to have two different google-services.json files. Please guide me, where to place these files. Thanks in advance.

Vrushali Sabnis
  • 197
  • 2
  • 12
  • See this https://support.google.com/firebase/answer/7015592. – Abbas Aug 31 '16 at 05:06
  • Both your debug and release builds are having the same package name right ?Why you need a separate json. If the package names are different you have to add one more client in json with that package name but there will be only one json. – Sunil Sunny Aug 31 '16 at 05:24
  • Yes I have same package name but have different Firebase databases to refer to. – Vrushali Sabnis Aug 31 '16 at 06:13

1 Answers1

1

you can use this like json array

    {
  "project_info": {
    "project_id": "quickblox.com:api-project-761750217637",
    "project_number": "761750217637",
    "name": "QuickBlox Android samples"
  },

  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "1:761750217637:android:c4299bc46191b0d7",
        "client_id": "android:com.quickblox.sample.groupchatwebrtc",
        "client_type": 1,
        "android_client_info": {
          "package_name": "com.quickblox.sample.groupchatwebrtc"
        }
      },
      "oauth_client": [],
      "api_key": [],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "cloud_messaging_service": {
          "status": 2,
          "apns_config": []
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "google_signin_service": {
          "status": 1
        },
        "ads_service": {
          "status": 1
        }
      }
    },
    {
      "client_info": {
        "mobilesdk_app_id": "1:761750217637:android:f7ceaf9593b66d36",
        "client_id": "android:com.quickblox.simplesample.messages",
        "client_type": 1,
        "android_client_info": {
          "package_name": "com.quickblox.simplesample.messages"
        }
      },
      "oauth_client": [],
      "api_key": [],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "cloud_messaging_service": {
          "status": 2,
          "apns_config": []
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "google_signin_service": {
          "status": 1
        },
        "ads_service": {
          "status": 1
        }
      }
    },
    {
      "client_info": {
        "mobilesdk_app_id": "1:761750217637:android:d150eafea3b1427e",
        "client_id": "android:com.quickblox.sample.chat",
        "client_type": 1,
        "android_client_info": {
          "package_name": "com.quickblox.sample.chat"
        }
      },
      "oauth_client": [],
      "api_key": [],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "cloud_messaging_service": {
          "status": 2,
          "apns_config": []
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "google_signin_service": {
          "status": 1
        },
        "ads_service": {
          "status": 1
        }
      }
    }
  ],
  "client_info": [],
  "ARTIFACT_VERSION": "1"
}
Shubham Chhipa
  • 161
  • 1
  • 8