作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我在 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
有人有解决办法吗?谢谢
最佳答案
我刚刚花了最后一个小时来解决这个完全相同的问题,并在他们的 repo 协议(protocol)中偶然发现了这条评论,最终为我修复了它。在我的例子中,结果证明是 Xcode 缓存的问题:
https://github.com/facebook/react-native/issues/25349#issuecomment-518830530
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 ..
希望这对您也有帮助!
关于ios - 架构 arm64 的 undefined symbol : _YGConfigNew in libyoga. a(Yoga.o),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59825748/
我是一名优秀的程序员,十分优秀!