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

标签 ios react-native xcode11

> 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中打开Project.xcworkspace文件
  2. 转到项目导航器标签
  3. 点击项目文件夹
  4. 然后在Targets部分选择项目名称
  5. 打开构建阶段标签
  6. 展开将二进制文件与库链接部分
  7. 删除除 libPods-Project.a 之外的所有二进制文件>

然后重建项目。

enter image description here

关于ios - ld : library not found for -lRCTBlob clang: error: linker command failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59254299/

相关文章:

ios - 设备重启时的 LocalNotification

javascript - 我的代码在我按下按钮之前运行

swift - 可选值上 KeyPath 的奇怪错误

ios - NSUSerDefault 没有为 swift 更新我的全局变量

ios - 每 30 秒更改一次 UILabel - Iphone

react-native - 如何解决 react-native-snap-carousel 中的闪烁图像?

debugging - Xcode 11.2.1 上的 com.apple.dt.SKAgent 消耗所有资源

ios - 无法安装“[AppName]” Xcode 11.5,iOS 13.5

ios - iOS:每2分钟在后台播放一次短声音

javascript - React-Native - 我无法使用状态字符串作为新的列表元素