首页 > 解决方案 > 安装 @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

标签: react-native

解决方案


推荐阅读