Help setting up Firebase for Android (SOLVED)

Hi there,

I’m setting up Firebase for Android using the the Firebase extension, but I don’t fully understand the instruction for setting up Firebase on Android.

I already downloaded the json file, but I don’t understand how exactly I can convert it into the XML resource. I’m using a Mac, do I have to run that in the terminal? I’m totally lost here.

Can anyone point me in the right direction? Thanks a lot!

These are the instructions:

  • Run generate_xml_from_google_services_json.py or generate_xml_from_google_services_json.exe (both from Firebase C++ SDK) to convert the previously downloaded google-services.json to an Android resource XML:
$ ./generate_xml_from_google_services_json.py -i google-services.json -o google-services.xml

Correct, the “$” (or sometimes “>” or similar) is a sign that it’s most likely something that is intended to be run in a command line prompt. (e.g Terminalin OSX)

In this case it’s a python file, and it should be possible to run as is.
Download the python file (e.g. to /Downloads).
Open a Terminal window, and type the command and press enter. (Change the paths accordingly)

$ ~/Downloads/generate_xml_from_google_services_json.py -i path/to/google-services.json -o path/to/google-services.xml

1 Like

Thanks a lot Mathias!

I’m learning a little by little about the terminal.

For those who prefer to avoid the terminal I also found this recourse which converts the json into the xml you need.

Convert google-services.json to values XML

Cheers!

1 Like