我创建了一个 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/