react-native - 安装 @react-native-firebase/messaging 后反应原生应用程序构建失败
问题描述
我正在尝试向我的应用程序添加通知。我安装了@react-native-firebase/app: "^8.4.7" 一切都很顺利,但是当我尝试安装@react-native-firebase/messaging: "^7.9.2" 并运行(npx react-native run-android) 我总是构建失败。
> Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at C:\Users\user\Desktop\sato\node_modules\@react-
native-firebase\app\package.json
:react-native-firebase_app:firebase.bom using default value: 25.12.0
:react-native-firebase_app:play.play-services-auth using default value: 18.1.0
:react-native-firebase_app package.json found at C:\Users\user\Desktop\sato\node_modules\@react-
native-firebase\app\package.json
:react-native-firebase_app:version set from package.json: 8.4.7 (8,4,7 - 8004007)
:react-native-firebase_app:android.compileSdk using custom value: 29
:react-native-firebase_app:android.targetSdk using custom value: 29
:react-native-firebase_app:android.minSdk using custom value: 16
:react-native-firebase_app:reactNativeAndroidDir C:\Users\user\Desktop\sato\node_modules\react-
native\android
> Configure project :react-native-firebase_messaging
:react-native-firebase_messaging package.json found at
C:\Users\user\Desktop\sato\node_modules\@react-native-firebase\messaging\package.json
:react-native-firebase_app package.json found at C:\Users\user\Desktop\sato\node_modules\@react-
native-firebase\app\package.json
:react-native-firebase_messaging:firebase.bom using default value: 25.12.0
:react-native-firebase_messaging package.json found at
C:\Users\user\Desktop\sato\node_modules\@react-native-firebase\messaging\package.json
:react-native-firebase_messaging:version set from package.json: 7.9.2 (7,9,2 - 7009002)
:react-native-firebase_messaging:android.compileSdk using custom value: 29
:react-native-firebase_messaging:android.targetSdk using custom value: 29
:react-native-firebase_messaging:android.minSdk using custom value: 16
:react-native-firebase_messaging:reactNativeAndroidDir C:\Users\user\Desktop\sato\node_modules\react-
native\android
> Task :app:mergeDebugResources
> Task :app:mergeDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
解决方案
推荐阅读
- python - PySpark 将 df 写入 csv,“列表索引超出范围”
- mysql - TypeError - indexOf 不是函数(React Data Search with MySQL)
- postgresql - Postgres HA 备用不使用证书
- tizen - 如何导航 Tizen 文件系统
- javascript - 如何用Javascript中的相同元素替换数组中的某些元素?
- codenameone - BrowserComponent 加载时加载对话框
- c# - 在 MVC 中动态添加时如何在每一行上将 Dropdownlist 值设置为 Textboxfor
- vb.net - 有没有更简单的方法来处理基本类型列表
- css - 如何防止 Safari 更改样式?
- excel - 在 msgbox 中格式化记录集 getString