Initialize firebase in a plugin
Question

I am developing a plugin that communicates with firebase, but I am getting the following error:

"Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project."

"FirebaseApp initialization unsuccessful"


I still can't find the problem, I'll try to explain how the project is structured.


- I added the dependencies in the gradle


- I created the method to capture the firebase token


- I added google-services.json inside a zip and put it in resources


But when I open the application and execute the method, I get the error:


"Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project."

"FirebaseApp initialization unsuccessful"


Can anyone help me understand what I may have forgotten?

Thank you for your help


Hi Rodrigo Santos,

I do not have much knowledge on this plugin issue but you can refer to this link, this may help.

Out of curiosity just want to know why you are creating a new plugin when you can use existing firebase plugin on forge.  


Thanks.


It is a plugin for Adobe campaign, but this one also uses firebase

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.