Reputation: 2490
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.
Upvotes: 22
Views: 18048
Reputation: 2490
UPDATE: AUGUST 2019
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.
Upvotes: 21
Reputation: 310
Using the 16.0.6 version the warning gone away
implementation 'com.google.firebase:firebase-core:16.0.6'
Upvotes: -3