First of all go to firebase.google.com and get your google-services.json (Google it, how to get started with that)
The copy that file to your “app” project, as the image below.
Then configure grade (both) like below
And not necessary but just in case, add internet permission to manifest.
And there you go. Not Fc anymore, do not forget to refresh build, and if you get FC, Go to a file manager with root access and delete “.aide” folder that contains all Maven repos, if no root, just clear AIDE data, or uninstall it and install it again. Some times is needed to complete refresh the build.