# File google-services.json is missing

**URL:** <https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504>\
**Category:** ionic-v3\
**Created:** [October 28, 2016, 1:23pm UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504 "2016-10-28T13:23:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardmarais](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardmarais/32/101456_2.png) [@richardmarais](https://forum.ionicframework.com/u/richardmarais)\
**Post date:** [October 28, 2016, 1:23pm UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/1 "2016-10-28T13:23:13Z")

</div>

Hi All,

I am using Ionic 2. In order to make use of Googles Push Notification Service, I need to install:

`ionic plugin add cordova-plugin-fcm`

However, after doing so, I get this error when I try build the app:

```
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
   Searched Location:
  E:\Development\IDE\ionic-apps\theWhoZoo\platforms\android\src\debug\google-services.json
  E:\Development\IDE\ionic-apps\theWhoZoo\platforms\android\google-services.json

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

```

So it appears to be missing the dependency `google-services.json` I think. Do I need to install it? How?

If anyone can assist I would appreciate it.

---

<div class="post-metadata">

**Author:** ![richardmarais](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardmarais/32/101456_2.png) [@richardmarais](https://forum.ionicframework.com/u/richardmarais)\
**Post date:** [October 28, 2016, 1:44pm UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/2 "2016-10-28T13:44:14Z")

</div>

Solution

I copied `google-services.json` to `\platforms\android`.

---

<div class="post-metadata">

**Author:** ![fatimaali](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@fatimaali](https://forum.ionicframework.com/u/fatimaali)\
**Post date:** [May 16, 2017, 1:14am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/3 "2017-05-16T01:14:35Z")

</div>

where did you find google-services.json ?

---

<div class="post-metadata">

**Author:** ![standoutweb](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@standoutweb](https://forum.ionicframework.com/u/standoutweb)\
**Post date:** [May 17, 2017, 3:13pm UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/4 "2017-05-17T15:13:01Z")

</div>

I just got this (or similar) issue because (I think) I updated phonegap-plugin-push to 2.0.0-rc3

Go to your project on [https://console.firebase.google.com/](https://console.firebase.google.com/)  
There you can add platform app. When you do that, there is the download button for google-services.json

---

<div class="post-metadata">

**Author:** ![fatimaali](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@fatimaali](https://forum.ionicframework.com/u/fatimaali)\
**Post date:** [May 18, 2017, 1:02am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/5 "2017-05-18T01:02:35Z")

</div>

Thanks i have found it

---

<div class="post-metadata">

**Author:** ![NikoRoberts](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nikoroberts/32/113035_2.png) [@NikoRoberts](https://forum.ionicframework.com/u/NikoRoberts)\
**Post date:** [October 10, 2017, 6:39am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/6 "2017-10-10T06:39:40Z")

</div>

so according to installation documentation on [https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#android-details](https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#android-details)

You should be get google-services.json from your Firebase console and put it in your root directory and then add this resource-file reference to config.xml :

```auto
<platform name="android">
  ...
  <resource-file src="google-services.json" target="google-services.json" />
</platform>

```

---

<div class="post-metadata">

**Author:** ![rootthenile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rootthenile/32/115068_2.png) [@rootthenile](https://forum.ionicframework.com/u/rootthenile)\
**Post date:** [November 27, 2017, 11:13am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/7 "2017-11-27T11:13:35Z")

</div>

To download a config file  
Sign in to Firebase and open your project.  
Click the Settings icon 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.

---

<div class="post-metadata">

**Author:** ![HugoHeneault](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@HugoHeneault](https://forum.ionicframework.com/u/HugoHeneault)\
**Post date:** [March 2, 2018, 10:53am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/8 "2018-03-02T10:53:25Z")

</div>

For anyone using codova-android \>= 7, you now must add

```auto
<platform name="android">
  <resource-file src="google-services.json" target="app/google-services.json" />
</platform>

```

---

<div class="post-metadata">

**Author:** ![raj-prashanth](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@raj-prashanth](https://forum.ionicframework.com/u/raj-prashanth)\
**Post date:** [March 27, 2018, 7:16am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/9 "2018-03-27T07:16:49Z")

</div>

iam using ionic v1. and i had included the required lines in the build.grade file. what should i do next?

---

<div class="post-metadata">

**Author:** ![DMoney](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@DMoney](https://forum.ionicframework.com/u/DMoney)\
**Post date:** [September 28, 2019, 4:31pm UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/11 "2019-09-28T16:31:08Z")

</div>

Is the same required for iOS? Should it be copied to the \platforms\ios

---

<div class="post-metadata">

**Author:** ![mani0011](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@mani0011](https://forum.ionicframework.com/u/mani0011)\
**Post date:** [September 18, 2020, 4:52am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/12 "2020-09-18T04:52:40Z")

</div>

All are saying place google services.json in root directory. Is the ‘root directory’ have no path name??

---

<div class="post-metadata">

**Author:** ![nikhilkgupta01](https://avatars.discourse-cdn.com/v4/letter/n/71e660/32.png) [@nikhilkgupta01](https://forum.ionicframework.com/u/nikhilkgupta01)\
**Post date:** [September 18, 2020, 10:13am UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/13 "2020-09-18T10:13:00Z")

</div>

Root directory is your project directory which you use to create your Ionic app.  
It means if you create your app in directory as ‘G:/Projects/XYZApp/’ then your root directory will be ‘G:/Projects/XYZApp/’. Copy your file here and change the config.xml as answered by HugoHeneault.  
A workaround would be to copy google-services.json file into the directory ‘G:/Projects/XYZApp/platforms/android/app/’, but it will require you to copy the file into this directory each time you build your app. So the option to add it in your root directory and change the preference of app in config.xml is preferable.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 8:54pm UTC](https://forum.ionicframework.com/t/file-google-services-json-is-missing/68504/14 "2021-07-19T20:54:05Z")

</div>

Closed on July 19, 2021, 8:54pm UTC


