Ios 架构arm64的未定义符号:libjoga.a(Yoga.o)中新增的

Ios 架构arm64的未定义符号:libjoga.a(Yoga.o)中新增的,ios,xcode,react-native,cocoapods,Ios,Xcode,React Native,Cocoapods,当我在ios模拟器中使用XCode或react native run ios启动我的应用程序时,它运行良好 但是如果我在一个真正的设备上做同样的事情,它就不起作用了。我有一个错误: Undefined symbols for architecture arm64: "YGConfig::YGConfig(int (*)(YGConfig*, YGNode*, YGLogLevel, char const*, char*))", referenced from: _YGConfi

当我在ios模拟器中使用XCode
react native run ios
启动我的应用程序时,它运行良好

但是如果我在一个真正的设备上做同样的事情,它就不起作用了。我有一个错误:

Undefined symbols for architecture arm64:
   "YGConfig::YGConfig(int (*)(YGConfig*, YGNode*, YGLogLevel, char const*, char*))", referenced from:
      _YGConfigNew in libyoga.a(Yoga.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
更多信息:

react: 16.9.0
react-native: 0.60.5
Real device: iPad with iOS 12.4.4

有人有解决办法吗?谢谢

我刚刚花了最后一个小时的时间用同样的问题把我的头撞在墙上,在他们的回购协议中偶然发现了这条评论,最终为我修复了它。在我的例子中,这是Xcode缓存的一个问题:

希望这也能帮助你

close xcode and any other IDE
rm -rf ~/library/developer/xcode/deriveddata
rm -rf ~/.rncache
rm -rf node_modules && npm install && cd ios && rm -rf Pods && pod install && cd ..