1 反应本机架构 armv7 的重复符号

1 duplicate symbol for architecture armv7 in react native

我的 react-native 版本“0.61.5”和我的 xcode 版本是 11 在我添加 push-notification-iosPush 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"
  }

如何解决这个问题?谢谢你帮助我

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

此错误意味着“_RCTRemoteNotificationReceived”这个库或包被 linked 不止一次,

react-native unlink

尝试删除节点模块

按照以下步骤操作:-

  • 纱线安装
  • cd ios
  • pod 安装
  • CD ..
  • react-native link

然后 运行 再次执行您的项目,但在执行所有这些操作之前删除派生数据。

看了你的截图,我觉得你应该试试这一步

在 Xcode -> Build Phases -> Link Binary With Libraries -> 删除 libRNCPushNotificationIOS.a

然后清理,构建你的项目

这应该有效