ld: library not found for -lRCTBlob clang: error: linker command failed

ld: library not found for -lRCTBlob clang: error: linker command failed

> Ld
> /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp
> normal x86_64 (in target 'MyApp' from project 'MyApp')
>     cd /Users/ajaysivan/MyApp/OfflineUpgrade/MyApp-offline-app/ios
>     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
> -target x86_64-apple-ios9.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/BVLinearGradient
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/DoubleConversion
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/FBReactNativeSpec
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/Folly
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/RCTTypeSafety
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/RNDeviceInfo
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/RNVectorIcons
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-Core
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-CoreModules
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTActionSheet
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTAnimation
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTBlob
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTImage
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTLinking
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTNetwork
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTSettings
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTText
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTVibration
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-cxxreact
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-jsi
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-jsiexecutor
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-jsinspector
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/ReactCommon
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/Sentry
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/SentryReactNative
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/Yoga
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/glog
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/react-native-config
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/react-native-geolocation
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/react-native-netinfo
> -F/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator
> -filelist /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp.LinkFileList
> -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -object_path_lto -Xlinker /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp_lto.o
> -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lBVLinearGradient -lDoubleConversion -lFBReactNativeSpec -lFolly -lRCTTypeSafety -lRNDeviceInfo -lRNVectorIcons -lReact-Core -lReact-CoreModules -lReact-RCTActionSheet -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReactCommon -lSentry -lSentryReactNative -lYoga -lc++ -lglog -lreact-native-config -lreact-native-geolocation -lreact-native-netinfo -lstdc++ -lz -framework Foundation -framework JavaScriptCore -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT
> -Xlinker __entitlements -Xlinker /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app-Simulated.xcent
> -framework JavaScriptCore -lRCTBlob -lRCTAnimation -lReact -lRCTActionSheet -lRCTGeolocation -lRCTImage -lRCTLinking -lRCTNetwork -lRCTSettings -lRCTText -lRCTVibration -lRCTWebSocket -lPods-MyApp -Xlinker -dependency_info -Xlinker /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp_dependency_info.dat
> -o /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp

.

> ld: library not found for -lRCTBlob clang: error: linker command
> failed with exit code 1 (use -v to see invocation)

在 Xcode11 中构建 react-native 项目时出现上述错误。我最近升级到 React Native 0.61.5,在 android 上一切正常。不知道为什么它在 iOS.

上不起作用

我真的是 iOS 和 react-native 的新手。如果您需要任何进一步的信息,请询问。

我已经按照以下步骤从 xCode 中删除了所有 react-native 库链接,从而解决了这个问题,

  1. 打开 xCode
  2. 中的 Project.xcworkspace 个文件
  3. 转到项目导航器选项卡
  4. 点击项目文件夹
  5. 然后 select Targets 部分中的项目名称
  6. 打开构建阶段 选项卡
  7. 展开 Link 带库的二进制文件 部分
  8. 删除除 libPods-Project.a
  9. 之外的所有二进制文件

然后重建项目。