lint error caused by google-services.json

97 views
Skip to first unread message

tgillon

unread,
Aug 8, 2016, 10:56:40 AM8/8/16
to Firebase Google Group
Hi,

I added all the required dependencies to my project in order to work with   com.google.gms.google-services.
As I understand the following file: google-services.json is supposed to add some entries to values.xml:  
default_web_client_id
gcm_defaultSenderId.....

I get lint error while trying to build the project about this values , that they appear to be unused.
Is there a way to prevent the json file from adding these values?



Thanks,
Tali

Samuel Stern

unread,
Aug 8, 2016, 11:09:56 AM8/8/16
to Firebase Google Group
Hey Tali,

There is not currently a way to disable the creation of certain resources by the google-services plugin.  If this is a big blocker for you, you can read the documentation here to see how the plugin works and maybe modify the JSON file to stop this, but I don't think it will be worth the effort.

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/4dd30ed6-4d73-4f2b-b6bc-c82a84601924%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tgillon

unread,
Aug 9, 2016, 10:22:02 AM8/9/16
to Firebase Google Group
Hi,

How come I get a lint error for : unused resource?
Am I supposed to use the values in the generated xml file?
Is there anyone else who got this lint error?

Thanks,
Tali

Samuel Stern

unread,
Aug 9, 2016, 10:53:02 AM8/9/16
to Firebase Google Group
The google-services plugin takes the json file and creates a set of string resources that you may need in your app (database URL, api key, etc).  However at the time when those resources are created there's no way to know which of them you will actually use in your app, so that's why you're getting some errors about unused resources.

I personally have not gotten this error, which might mean that you have stricter lint settings than I do.

- Sam

Reply all
Reply to author
Forward
0 new messages