標籤:command himi react react native sh failed with exit code
本站文章均為 李華明Himi 原創,轉載務必在明顯處註明:
轉載自【黑米GameDev街區】 原文連結: http://www.himigame.com/react-native/2315.html
Himi最近在真機運行遇到 Command /bin/sh failed with exit code 1 的錯誤, 模擬器運行沒有任何問題。此問題已解決,這裡分享下解決方案。
先來看下錯誤記錄檔,如:
650) this.width=650;" class="alignnone size-medium wp-image-2316" src="http://www.himigame.com/wp-content/uploads/2016/06/112321-300x149.png" alt="112321" width="300" height="149" style="margin:0px;padding:1px;border:1px solid rgb(97,146,140);font-family:inherit;font-size:inherit;font-style:inherit;line-height:inherit;height:auto;" />
主要是劃線的部分:
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” ,如:
650) this.width=650;" class="alignnone size-medium wp-image-2320" src="http://www.himigame.com/wp-content/uploads/2016/06/34231-300x104.png" alt="34231" width="300" height="104" style="margin:0px;padding:1px;border:1px solid rgb(97,146,140);font-family:inherit;font-size:inherit;font-style:inherit;line-height:inherit;height:auto;" />
3.Clean 項目,重新運行即可。
本文出自 “李華明Himi” 部落格,請務必保留此出處http://xiaominghimi.blog.51cto.com/2614927/1785442
【REACT NATIVE 系列教程之十】真機運行報錯COMMAND /BIN/SH FAILED WITH EXIT CODE 1 的解決方案