Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I place Googleservices.json in Flutter app in order to solve 'google-services.json is missing'

Tags:

I get this error when i try building the default flutter app after integrating it with Firebase

I have placed the googleservices.json in the right place. Now it says it is searching for it in locations that are not there. like

src\debug\nullnull\google- services.json     

this folder does not even exist, i have looked and it is not present.

Launching lib\main.dart on Phone in debug mode... Configuration 'compile' in project ':app' is deprecated. Use  'implementation' instead.  registerResGeneratingTask is deprecated, use   registerGeneratedFolders(FileCollection)  registerResGeneratingTask is deprecated, use   registerGeneratedFolders(FileCollection)  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)  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:  C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnull\debug\google-  services.json C:\Users\rober\Documents\VS\APPNAME\android\app\src\debug\nullnull\google-  services.json C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnull\google-  services.json C:\Users\rober\Documents\VS\APPNAME\android\app\src\debug\google-  services.json C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnullDebug\google-  services.json C:\Users\rober\Documents\VS\APPNAME\android\app\google-services.json  * Try: Run with --stacktrace option to get the stack trace. Run with --info or --  debug option to get more log output.  * Get more help at https://help.gradle.org  BUILD FAILED in 8s Gradle build failed: 1 Exited (sigterm) 
like image 824
Taio Avatar asked Aug 10 '18 09:08

Taio


People also ask

Where do I put Google services json in Flutter?

Adding the JSON File The google-services.json file is generally placed in the app/ directory (at the root of the Android Studio app module). As of version 2.2.0 the plugin supports build type and product flavor specific JSON files.

How do I add Google services to json app?

Get config file for your Android appIn the Your apps card, select the package name of the app for which you need a config file. Click google-services. json. Move your config file into the module (app-level) directory of your app.


1 Answers

You need to place it under android/app:

location of google-service.json

Also it should be named google-services.json without the space after the dash. To rename it right click on it then click Refactor>Rename.

like image 92
Peter Haddad Avatar answered Sep 21 '22 19:09

Peter Haddad