0

我尝试了许多在网上找到的解决方案,但没有任何运气。我想存档一个 react-native 项目,但它一直失败并出现此错误

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RCTCxxBridge", referenced from:
      objc-class-ref in libReact.a(RCTBridge.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

这是我的podfile

rn_path = '../node_modules/react-native'
  pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
  pod 'React', path: rn_path, subspecs: [
    'BatchedBridge',
    'CxxBridge',
    'DevSupport',
    'RCTText',
    'RCTImage',
    'RCTNetwork',
    'Core',
    'RCTWebSocket',
  ]

  # 'Core',
  # 'CxxBridge',
  # 'BatchedBridge',
  # 'DevSupport',
  # 'RCTActionSheet',
  # 'RCTAnimation',
  # 'RCTGeolocation',
  # 'RCTImage',
  # 'RCTLinkingIOS',
  # 'RCTNetwork',
  # 'RCTSettings',
  # 'RCTText',
  # 'RCTVibration',
  # 'RCTWebSocket',

评论库是我一开始尝试使用的库,在搜索时我评论了它并用那里的库替换了它。

这是带有库列表的链接二进制文件:

在此处输入图像描述

反应原生版本:0.58.1

xcode版本:10.2

4

0 回答 0