Integrate firebase in ionic/native

I am trying to build by native app using ionic appFlow in the cloud… howerver i get the following error.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDebugGoogleServices’.

File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:

How do i make by google-services.json file copy into the android/app folder?


Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 5.0.4
@angular-devkit/build-angular : 0.803.24
@angular-devkit/schematics : 8.3.20
@angular/cli : 8.3.20
@ionic/angular-toolkit : 2.2.0


Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 11 other plugins)


cordova-res : not installed
native-run (update available: 0.3.0) : 0.2.8


NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave

Add this to under the android Section in the config.xml:

<resource-file src="google-services.json" target="app/google-services.json"></resource-file>

@EinfachHans i have the same issue with ionic appflow. Do you have any idea(s) on how i can fix this issue without having to upload the google-services.json file (for security purposes) to my online git repository.


I think the Project Files are the correct location for these files. Your Git Repository should be private.

@EinfachHans Thanks for the reply.
So what you are saying is, the only way i can fix the issue is by including the google-services.json when uploading the project files to the repository? Because what i did is, i uploaded all the ionic project files excluding the platforms folder to my online repository. The platforms folder contains the google-services.json file in “android/app” dir. Then in connected the repository to Ionic Appflow.
I thought appflow had a provision to add this file separately.

The platforms Folder is the Place where the File should be after build. As it is 100% generated, it is the wrong Place to place additional Files before. In my project i included it in the root folder and added it to the android platform via config.xml.

Oh Alright. Makes sense. Thanks