Android firebase 推送通知最低版本问题

标签 android firebase firebase-cloud-messaging firebaseui

我创建了一个 firebase 推送通知应用程序,gradle 文件中的最小版本为 16。当我将其更改为 15 或小于 15 时,出现错误显示

uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library D:\MyApp\app\build\intermediates\exploded-aar\com.firebaseui\firebase-ui-auth\0.6.0\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.firebase.ui.auth" to force usage

我在gradle项目中使用的依赖是

dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'
    classpath 'com.google.gms:google-services:3.0.0'}

在应用程序中 gradle 是

compile 'com.google.firebase:firebase-messaging:10.2.4'

我如何在低于 16 的 API 级别中使用推送通知

最佳答案

问题不是来自推送通知,而是来自您正在使用的这个库:

com.firebaseui:firebase-ui-auth

FirebaseUI is an open-source library that offers simple, customizable UI bindings on top of the core Firebase SDKs. It aims to eliminate boilerplate code and promote best practices (both user experience and security) for authentication.

这里是了解更多信息的链接:

https://github.com/firebase/FirebaseUI-Android/tree/master/auth

要解决您的问题,请转到 list 文件并添加以下内容:

<uses-sdk tools:overrideLibrary="com.firebase.ui.auth" />

关于Android firebase 推送通知最低版本问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47736678/

相关文章:

android - fragment 反向移植需要单独的反向移植类和蜂窝类吗?

firebase - 在 Kotlin 中以同步方式运行异步任务

javascript - 带有 firebase 的 Google Polymer : timing

push-notification - 无法在 Android 上获取 expo push token

java - 通过 FCM onMessageReceived 方法从 RemoteMessage 获取值

android - Activity 的 TextView 为空

android - Android 中的录像机应用程序使用 SurfaceView 和媒体录像机 : while recording video, 它显示向左弯曲 90 度

android - 在安装适用于Windows 7(64位)的Android SDK之后,为什么没有加载任何程序包?

javascript - Firebase:演示项目出错(auth/invalid-api-key)

firebase - FCM token - 我什么时候应该在我的数据库中存储/保存它?