[react native中的体系结构armv7的1个重复符号

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

我的本机版本“ 0.61.5”,我的xcode版本是11,在我向项目添加push-notification-ios Push Notification ios之后,我收到此错误:

duplicate symbol '_RCTRemoteNotificationReceived' in:
    .../Library/Developer/Xcode/DerivedData/myprojectname-busrrsxathritwfouhsiiyaolopv/Build/Products/Debug-iphoneos/RNCPushNotificationIOS/libRNCPushNotificationIOS.a(RNCPushNotificationIOS.o)
    .../Library/Developer/Xcode/DerivedData/myprojectname-busrrsxathritwfouhsiiyaolopv/Build/Products/Debug-iphoneos/React-RCTPushNotification/libReact-RCTPushNotification.a(RCTPushNotificationManager.o)
ld: 1 duplicate symbol for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我完成这项工作,但收到此错误:

1.clean project
2.claen pod
3.delete pods and install again 

这是我的package.json:

"dependencies": {
    "@react-native-community/push-notification-ios": "^1.0.5",
    "axios": "^0.19.2",
    "fast-xml-parser": "^3.16.0",
    "he": "^1.2.0",
    "jalali-moment": "^3.3.3",
    "jetifier": "^1.6.5",
    "lodash": "^4.17.15",
    "native-base": "^2.13.8",
    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-collapsible": "^1.5.1",
    "react-native-device-info": "^5.5.1",
    "react-native-elements": "^1.2.7",
    "react-native-firebase": "^5.6.0",
    "react-native-gesture-handler": "^1.5.3",
    "react-native-maps": "^0.25.0",
    "react-native-material-dropdown": "git+https://github.com/harshitjee/react-native-material-dropdown.git",
    "react-native-popup-menu": "^0.15.6",
    "react-native-push-notification": "^3.1.9",
    "react-native-reanimated": "^1.7.0",
    "react-native-responsive-screen": "^1.3.1",
    "react-native-segmented-control-tab": "^3.4.1",
    "react-native-simple-table": "0.0.3",
    "react-native-table-component": "^1.2.1",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "^3.13.0",
    "react-redux": "^7.1.3",
    "react-table": "^7.0.0-rc.15",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
  }

如何解决这个问题?感谢您的帮助

更新:这是错误的屏幕截图enter image description here更新2:这是构建阶段的屏幕截图:enter image description here

reactjs react-native react-native-push-notification
2个回答
0
投票
此错误表示此库或程序包已多次链接到“ _RCTRemoteNotificationReceived”,

本机取消链接

尝试

删除节点模块

请按照以下步骤:-

    纱线安装
  • cd ios
  • pod安装
  • cd ..
  • 本机链接
  • 然后再次运行您的项目,但先执行所有此操作,然后再删除所有衍生数据。

  • 0
    投票
    看到您的屏幕截图后,我认为您应该尝试一下此步骤

    在Xcode中->构建阶段->使用库链接二进制文件->删除libRNCPushNotificationIOS.a

    然后清理,构建您的项目

    这应该工作

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