本站文章均为 李华明Himi 原创
width="150" height="210" frameborder="0" scrolling="no" src="http://widget.weibo.com/relationship/bulkfollow.php?language=zh_cn&uids=1916000601&wide=1&color=FFFFFF,FFFFFF,0082CB,666666&showtitle=0&showinfo=1&sense=0&verified=1&count=1&refer=http%3A%2F%2Fwww.himigame.com%2Freact-native%2F2315.html&dpc=1" style="margin: 0px; padding: 0px; border-width: 0px; font-family: inherit;font-size:undefined; font-style: inherit; font-variant-caps: inherit; line-height: inherit; max-width: 100%;">
Himi最近在真机运行遇到 Command /bin/sh failed with exit code 1 的错误, 模拟器运行没有任何问题。此问题已解决,这里分享下解决方案。
先来看下错误日志,如下图:
主要是划线的部分:
1.PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images ……
2. Command /bin/sh failed with exit code 1
解决方法:
1. 选中项目 -> TARGETS->Build Phases-> “Bundle React Native code and images”
2.勾选 “Run script only when installing” ,如下图:
3.Clean 项目,重新运行即可。