Search code examples
reactjsreact-nativereact-native-push-notification

1 duplicate symbol for architecture armv7 in react native


my react-native version "0.61.5" and my xcode version is 11 after I added push-notification-iosPush Notification ios to project I get this error :

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)

i do this job but get this error :

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

and this is my 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"
  }

how to solve this problems? thanks for helping me

Update: this is Screenshot of the error enter image description here Update 2: this is Screenshot of the build Phases: enter image description here


Solution

  • After seeing your screenshot, I think you should give this step a try

    In Xcode -> Build Phases -> Link Binary With Libraries -> remove libRNCPushNotificationIOS.a

    then clean, build your project

    This should work