How to add firebase-admin to my android project?

Solution 1:

firebase-admin is not intended for use in Android apps. It's for accessing Firebase services from servers your control.

From the documentation regarding prequisites:

  • Make sure that you have a server app.
  • Make sure that your server runs the following depending on which Admin SDK that you use:
    • Admin Node.js SDK — Node.js 8.13.0+
    • Admin Java SDK — Java 7+ (recommend Java 8+)
    • Java 7 support is deprecated.
    • Admin Python SDK — Python 3.5+
    • Admin Go SDK — Go 1.9+ Admin .NET SDK — .NET Framework 4.5+ or .Net Core 1.5+

The google-services plugin is giving you that warning because it thinks every maven target with group "com.google.firebase" is actually a Firebase Android client SDK, which all must be the same version in your app.