You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决Firebase Admin SDK与firebase-core依赖不兼容问题?

Firebase Core & Admin SDK Version Compatibility Fix

Hey there! Let's sort out this version mismatch issue between your Firebase client and admin SDKs.

First, a quick key point: Firebase's client SDKs (like firebase-core for Android) and Admin SDKs have separate versioning systems, so they don't need an exact number match—but they do need to be aligned in terms of feature support to work smoothly together. Your current firebase-core:11.8.0 is a pretty old client release (circa late 2017), so we need to pick an Admin SDK version that's compatible with the feature set of that client era.

  • Sticking with your existing client SDK: If you don't want to upgrade firebase-core:11.8.0, go with com.google.firebase:firebase-admin:5.12.0 or 5.13.0. These Admin SDK versions were released around the same time as the 11.x client SDKs, so they fully support all the features your client is using and won't throw compatibility errors.
  • Better long-term option: Upgrade both (for security & features): Old SDK versions lack critical security patches and new features. If you can upgrade your client SDK, here's a stable, compatible pair:
    • Client: com.google.firebase:firebase-core:19.0.0 (the last standalone firebase-core release—after this, Firebase Core functionality is bundled into the Firebase BOM)
    • Admin: com.google.firebase:firebase-admin:9.0.0

Pro Tip for Future Compatibility

Once you're ready for a more streamlined setup, use the Firebase BOM (Bill of Materials) for your client SDKs. The BOM automatically manages all client SDK versions to ensure they're compatible, so you never have to manually match individual SDK versions again. Here's how it looks in Gradle:

implementation platform('com.google.firebase:firebase-bom:32.7.0')
implementation 'com.google.firebase:firebase-core'

For this BOM version, you can safely use com.google.firebase:firebase-admin:12.0.0 as your Admin SDK—it's fully compatible with all features in the BOM-managed client SDKs.

内容的提问来源于stack exchange,提问作者Octavian Catusanu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:25:44