无法在React Native项目中集成Notifee(RN 0.61.5)

问题描述 投票:0回答:1

我正在尝试在使用应用程序时处理通知。

我尝试为此实现 notifiee 包,但无法事件 gradle clean 或构建应用程序。

这是我的package.json:

{
  "name": "ReactNativeTemplate",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "rimraf ./android/app/build/generated/res/google-services && react-native run-android",
    "ios": "npx react-native run-ios --simulator='iPhone SE (2nd generation)'",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@babel/plugin-proposal-decorators": "^7.7.4",
    "@hmscore/hms-js-base": "^5.0.5-300",
    "@hmscore/react-native-hms-push": "^6.3.0-304",
    "@notifee/react-native": "^4.0.1",
    "@react-native-community/async-storage": "^1.6.3",
    "@react-native-community/push-notification-ios": "^1.1.1",
    "axios": "^0.19.0",
    "base64-arraybuffer": "^0.2.0",
    "dayjs": "^1.8.34",
    "formik": "^2.1.4",
    "he": "^1.2.0",
    "lodash": "^4.17.15",
    "mobx": "^5.15.0",
    "mobx-react": "^6.1.4",
    "moment": "^2.26.0",
    "native-base": "^2.13.12",
    "patch-package": "^6.2.2",
    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-animatable": "^1.3.3",
    "react-native-autocomplete-input": "^5.0.0",
    "react-native-calendars": "^1.308.0",
    "react-native-confetti-cannon": "^1.5.1",
    "react-native-datepicker": "^1.7.2",
    "react-native-device-info": "^5.6.1",
    "react-native-document-picker": "^4.2.0",
    "react-native-draggable-flatlist": "^2.3.3",
    "react-native-firebase": "^5.5.5",
    "react-native-gesture-handler": "^1.5.2",
    "react-native-gifted-chat": "^0.16.3",
    "react-native-htmlview": "^0.15.0",
    "react-native-i18n": "^2.0.15",
    "react-native-image-picker": "^2.3.2",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-modal": "^11.5.6",
    "react-native-multiple-select": "^0.5.6",
    "react-native-paper": "^3.10.1",
    "react-native-pdf": "^6.1.2",
    "react-native-phone-call": "^1.0.9",
    "react-native-qrcode-svg": "^6.0.6",
    "react-native-reanimated": "^1.8.0",
    "react-native-render-html": "^4.2.0",
    "react-native-snap-carousel": "^3.9.0",
    "react-native-sound": "^0.11.0",
    "react-native-svg": "^12.1.0",
    "react-native-swiper": "^1.6.0-rc.3",
    "react-native-vector-icons": "^6.6.0",
    "react-native-video": "^4.4.5",
    "react-native-video-player": "^0.10.0",
    "react-native-webview": "^9.2.2",
    "react-navigation": "^4.0.10",
    "react-navigation-stack": "^1.10.3",
    "react-navigation-tabs": "^2.8.12",
    "rn-fetch-blob": "^0.12.0",
    "rn-tooltip": "^3.0.0",
    "save": "^2.4.0",
    "uuid": "^8.3.0",
    "yup": "^0.28.4"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "eslint": "^6.5.1",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.56.0",
    "react-test-renderer": "16.9.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

这是我尝试 gradlew clean 或在 android 上构建时的输出:

* What went wrong:
A problem occurred configuring project ':@notifee_react-native'.
> Cannot change artifacts of dependency configuration ':@notifee_react-native:default' after it has been included in dependency resolution.    

有关更多信息,我正在使用 gradle 6.3,构建 gradle 选项是:

ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 21
        compileSdkVersion = 33
        targetSdkVersion = 33
    }

感谢您的帮助!

android react-native push-notification android-notifications mobile-development
1个回答
0
投票

尝试更改agconnect版本,就像这个问题

© www.soinside.com 2019 - 2024. All rights reserved.