Firebase Android SDK 對 Google Play 服務的依賴

某些 Firebase Android SDK 依賴Google Play 服務,這意味著它們只能在安裝了 Google Play 服務的裝置和模擬器上運行。這些 Firebase SDK 與裝置上的 Google Play 服務後台服務通信,為您的應用程式提供安全、最新且輕量級的 API。某些 Android 裝置(例如 Amazon Kindle Fire 裝置或在某些地區銷售的裝置)未安裝 Google Play 服務。

哪些 Firebase Android SDK 需要 Google Play 服務?

Firebase SDK 可分為三類:

  • 需要 Play 服務- 這些 SDK 需要 Google Play 服務,否則它們沒有任何功能。
  • 推薦的 Play 服務- 這些 SDK 要求 Google Play 服務具有完整的功能,但即使沒有 Google Play 服務,它們仍然提供大部分功能。
  • 不需要 Play 服務- 這些 SDK 不需要 Google Play 服務具有完整的功能。

下表僅適用於每個 SDK 的最新版本。一些舊版本可能有更嚴格的要求。

不需要Google Play 服務

產品圖書館谷歌播放服務?
應用程式檢查自訂和調試提供者com.google.firebase:firebase-appcheck:17.1.1
com.google.firebase:firebase-appcheck-ktx:17.1.1
com.google.firebase:firebase-appcheck-debug:17.1.1
不需要
應用程式分發 API com.google.firebase:firebase-appdistribution-api:16.0.0-beta11
com.google.firebase:firebase-appdistribution-api-ktx:16.0.0-beta11
不需要
應用程式分發com.google.firebase:firebase-appdistribution:16.0.0-beta11不需要
驗證com.google.firebase:firebase-auth:22.2.0
com.google.firebase:firebase-auth-ktx:22.2.0
不需要
雲端Firestore com.google.firebase:firebase-firestore:24.9.1
com.google.firebase:firebase-firestore-ktx:24.9.1
不需要
Firebase 用戶端 SDK 的雲端函數com.google.firebase:firebase-functions:20.4.0
com.google.firebase:firebase-functions-ktx:20.4.0
不需要
Firebase 雲端儲存com.google.firebase:firebase-storage:20.3.0
com.google.firebase:firebase-storage-ktx:20.3.0
不需要
崩潰解決方案com.google.firebase:firebase-crashlytics:18.5.1
com.google.firebase:firebase-crashlytics-ktx:18.5.1
不需要
應用程式內訊息傳遞com.google.firebase:firebase-inappmessaging:20.4.0
com.google.firebase:firebase-inappmessaging-ktx:20.4.0
不需要
應用程式內訊息顯示com.google.firebase:firebase-inappmessaging-display:20.4.0
com.google.firebase:firebase-inappmessaging-display-ktx:20.4.0
不需要
Firebase 安裝com.google.firebase:firebase-installations:17.2.0
com.google.firebase:firebase-installations-ktx:17.2.0
不需要
效能監控com.google.firebase:firebase-perf:20.5.0
com.google.firebase:firebase-perf-ktx:20.5.0
不需要
即時資料庫com.google.firebase:firebase-database:20.3.0
com.google.firebase:firebase-database-ktx:20.3.0
不需要
遠端配置com.google.firebase:firebase-config:21.5.0
com.google.firebase:firebase-config-ktx:21.5.0
不需要
產品圖書館谷歌播放服務?
AdMob com.google.android.gms:播放服務廣告:22.5.0受到推崇的*
分析com.google.firebase:firebase-analytics:21.5.0
com.google.firebase:firebase-analytics-ktx:21.5.0
受到推崇的*
應用程式檢查播放完整性提供者com.google.firebase:firebase-appcheck-playintegrity:17.1.1必需的
應用程式檢查 SafetyNet 供應商com.google.firebase:firebase-appcheck-safetynet:16.1.2必需的
應用程式索引com.google.firebase:firebase-appindexing:20.0.0必需的
雲端訊息傳遞com.google.firebase:firebase-messaging:23.3.1
com.google.firebase:firebase-messaging-ktx:23.3.1
必需的
動態連結com.google.firebase:firebase-dynamic-links:21.2.0
com.google.firebase:firebase-dynamic-links-ktx:21.2.0
必需的
Firebase ML 視覺com.google.firebase:firebase-ml-vision:24.1.0必需的
Firebase ML 自訂模型com.google.firebase:firebase-ml-model-interpreter:22.0.4必需的

* 適用於 Google Analytics 的 Firebase SDK 可以在任何裝置上傳送事件,但某些自動洞察(例如人口統計資料)僅在具有 Google Play 服務的裝置上可用。