3

I use only Firebase Database and I've added only the next dependency:

implementation 'com.google.firebase:firebase-database:16.0.1'

it seems works ok

but during compilation I get next warning

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

Should I still add Core? like:

implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
user25
  • 2,873
  • 2
  • 30
  • 66
  • Possible duplicate of [Is \`firebase-core\` required for Firebase on Android?](https://stackoverflow.com/questions/50765554/is-firebase-core-required-for-firebase-on-android) – TheIT Nov 22 '18 at 00:30
  • @TheIT just mark it as duplicate then, no need to down vote – user25 Dec 16 '18 at 18:46
  • Agreed, I didn't downvote though :( – TheIT Dec 16 '18 at 21:04
  • @TheIT ah.. ok. Sorry. – user25 Dec 16 '18 at 21:27
  • Another SO entry that was supposedly a duplicate of this one sent me here (https://stackoverflow.com/questions/52685463/gradle-must-have-dependency-on-com-google-firebasefirebase-core-for-firebase-se) and this one really isn't a duplicate of the one mentioned at the top of these comments, instead this one is the best answer. – raddevus Feb 20 '19 at 00:01

1 Answers1

6

Yes, you have to explicitly list it now:

Update - June 12, 2018

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

more info here:

https://firebase.google.com/support/release-notes/android

Community
  • 1
  • 1
Peter Haddad
  • 78,874
  • 25
  • 140
  • 134