如何解决 React Native iOS 中的“架构 armv7 的未定义符号"? [英] How solve 'Undefined symbols for architecture armv7' in React Native iOS?
本文介绍了如何解决 React Native iOS 中的“架构 armv7 的未定义符号"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在构建 release react native ios 时遇到问题,我尝试寻找很多示例,但都失败了.
I get a problem to build release react native ios, I try to look for many examples, but fail all.
这是错误信息:
Undefined symbols for architecture armv7:
"_RCTDefaultLogFunction", referenced from:
-[momsindonesiaTests testRendersWelcomeScreen] in momsindonesiaTests.o
"_RCTSharedApplication", referenced from:
-[momsindonesiaTests testRendersWelcomeScreen] in momsindonesiaTests.o
"_RCTSetLogFunction", referenced from:
-[momsindonesiaTests testRendersWelcomeScreen] in momsindonesiaTests.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我又不知道怎么解决这个错误,请帮我解决这个问题.
谢谢.
推荐答案
我在 Xcode 10.1 中遇到了同样的问题,并且对原生 0.61.5 做出了反应.要解决这个问题,试试这个.
I had the same issue with Xcode 10.1 and react native 0.61.5. To fix try this.
- 转到 Xcode 中的项目导航器
- 点击项目并转到构建设置
- 选择'yourappname'Tests,然后在Build active Architecture Only 下选择Release 下的'Yes'.默认情况下,它设置为否".
- 尝试重建,这次应该会重建.
希望这个解决方案也适用于您.
Hope this solution works for you as well.
这篇关于如何解决 React Native iOS 中的“架构 armv7 的未定义符号"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文