Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is `firebase-core` required for Firebase on Android?

Tags:

As far as I know, individual Firebase libraries like firebase-auth didn't used to require me to include firebase-core.

However, I recently started a new Android project, and when I tried to build without firebase-core, I got the following Java compiler warning:

Warning: The app gradle file must have a dependency on com.google.firebase:firebase-core for Firebase services to work as intended.

like image 702
Jeff Avatar asked Jun 08 '18 17:06

Jeff


1 Answers

UPDATE: AUGUST 2019

The docs now show whether a specific product SDK requires firebase-analytics, if firebase-analytics is recommended, or if it is not needed at all.

firebase-core is no longer listed as a required dependency in the Android getting started guide and was removed from the list of available libraries.

Now adding firebase-analytics to your app is optional in the getting started guide. Products that do require firebase-core, such as In-App Messaging, list the firebase-core dependency in their setup guides.


ORIGINAL ANSWER:

This is a recent change as of May 23, 2018. Per the release notes:

Your app gradle file now has to explicitly list com.google.firebase:firebase-core as a dependency for Firebase services to work as expected.

This requirement is reflected in the "Set up {X} for Android" guides (example) in the step "Install the Firebase SDK". That step links to this page, which includes the requirement to add firebase-core.

edit 9/26/18: A summary of features that rely on Google Analytics for Firebase (and therefore firebase-core) can be found here.

like image 197
Jeff Avatar answered Oct 03 '22 07:10

Jeff