{"id":272,"date":"2017-07-21T13:08:22","date_gmt":"2017-07-21T05:08:22","guid":{"rendered":"http:\/\/yusemo.com\/?p=272"},"modified":"2017-07-26T10:05:28","modified_gmt":"2017-07-26T02:05:28","slug":"react-native-%e5%bc%82%e5%b8%b8","status":"publish","type":"post","link":"https:\/\/yusemo.com\/?p=272","title":{"rendered":"React-native \u5f02\u5e38"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u6363\u9f13\u4e0brn\uff0c\u521a\u5165\u95e8\u5c31\u4e00\u5806\u9519\u8bef\u5e76\u4e14\u518dxcode\u91cc\u9762\u5c55\u793a\u770b\u5230\u4e00\u5934\u96fe\u6c34\u3002\u7f51\u4e0a\u8d44\u6599\u4e0d\u662f\u5f88\u591a\uff0c\u5bf9\u4e8e\u524d\u7aef\u6765\u8bf4\u7b80\u76f4\u5c31\u662f\u5165\u95e8\u7a0b\u5ea6\u96be\u4e0a\u52a0\u96be\u3002\u56e0\u6b64\u81ea\u6211\u505a\u4e2a\u8bb0\u5f55\u3002<br \/>\n\u76ee\u524d\u5f00\u53d1\u73af\u5883\uff1a<br \/>\nxcode\uff1a8.3.3<br \/>\nnode\uff1a8.1.2<br \/>\nreact-native-cli: 2.0.1<br \/>\nreact-native: 0.45.1<\/p>\n<p>\u65b0\u7248\u672c\u7684rn 0.45\u7cfb\u5217\u4e00\u542f\u52a8xcode\u6a21\u62df\u5bb9\u6613\u51fa\u9519\u5173\u952e\u5728\u4e8e\u52a0\u8f7d\u7684\u5305\u7684\u4e0b\u8f7d\u95ee\u9898-\uff08\u8981\u4e0d\u5c31\u964d\u7ea7\u7248\u672c\u8981\u4e0d\u5c31\u662f\u4e00\u6b65\u6b65\u67e5\u627e\u7f3a\u5931\u7684\u6587\u4ef6\u5305\u7b49\uff09\u3002<\/p>\n<h2><strong>ios<\/strong><br \/>\n\u4e00\u542f\u52a8\u5c31\u62a5\u9519<br \/>\n<a href=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/55555_1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-273\" src=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/55555_1.png\" alt=\"\" width=\"1586\" height=\"1122\" \/><\/a><\/h2>\n<p>unpacking \/.rncache\/glog-0.3.4.tar.gz \u5173\u952e\u5b57<\/p>\n<p>\u4ea7\u751f\u539f\u56e0\uff1a<\/p>\n<p>\/Users\/mocoyu\/.rncache \u4e2d boost_1_63_0.tar.gz\uff0c double-conversion-1.1.5.tar.gz\uff0c folly-2016.09.26.00.tar.gz\uff0c glog-0.3.4.tar.gz \u57fa\u672c\u6587\u4ef6\u4e0b\u8f7d\u4e0d\u5b8c\u6574<br \/>\nnode_modules\/react-native\/third-party \u6587\u4ef6\u4e0d\u5b8c\u6574<\/p>\n<p>\u4ee5\u4e0a\u57fa\u672c\u90fd\u662f\u7b2c\u4e09\u65b9\u7684\u6a21\u5757\u6ca1\u4e0b\u8f7d\u4e0b\u6765\u3002<\/p>\n<p>\u5bf9\u4e8e\u8fd9\u79cd\u8981\u4e0d\u662f\u6ca1\u6b63\u786e\u4e0a\u7f51\u59ff\u52bf\uff08\u6b63\u786e\u7684\u7ffbwa11\uff09\u8981\u4e0d\u5c31\u662f\u4e0b\u8f7d\u4e0d\u5b8c\u5168<br \/>\n\u56e0\u6b64\u89e3\u51b3\u529e\u6cd5\uff1a<br \/>\n1\u3001\u5220\u9664 .rncache \u540e\u91cd\u65b0\u4e0b\u8f7d\uff0c\u6216\u624b\u52a8\u4e0b\u8f7d\u540e\u653e\u5165 .rncache \u4e2d<br \/>\n2\u3001\u628a\u4ee5\u4e0a\u6587\u4ef6\u89e3\u538b\u540e\u653e\u5165 node_modules\/react-native\/third-party \u4e0b<br \/>\n3\u3001Clean &amp; Build<\/p>\n<p>.rncache \u6587\u4ef6\u4f4d\u7f6e\u5728\uff1a<br \/>\n<a href=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/5555_2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-274\" src=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/5555_2.jpg\" alt=\"\" width=\"1322\" height=\"1182\" \/><\/a><\/p>\n<p>\u663e\u793a\u7cfb\u7edf\u9690\u85cf\u6587\u4ef6\u529e\u6cd5\uff0c\u7ec8\u7aef\u8f93\u5165\uff1a<br \/>\n<span style=\"color: #ff0000;\">defaults write com.apple.finder AppleShowAllFiles -bool true \/\/\u663e\u793a\u9690\u85cf\u6587\u4ef6<\/span><br \/>\n<span style=\"color: #ff0000;\">defaults write com.apple.finder AppleShowAllFiles -bool false \/\/\u4e0d\u663e\u793a\u9690\u85cf\u6587\u4ef6<\/span><br \/>\n\u547d\u4ee4\u8fd0\u884c\u4e4b\u540e\u9700\u8981\u91cd\u65b0\u52a0\u8f7dFinder\uff1a\u5feb\u6377\u952eoption+command+esc\uff0c\u9009\u4e2dFinder\uff0c\u91cd\u65b0\u542f\u52a8\u5373\u53ef<\/p>\n<p>&nbsp;<\/p>\n<p>\u5982\u679c\u4ee5\u4e0a\u4f60\u90fd\u89e3\u51b3\u4e0d\u4e86\u90a3\u5c31\u662fwa11\u95ee\u9898\uff0c\u4f60\u9700\u8981\u5982\u4e0b\u64cd\u4f5c<br \/>\n1\u3001https:\/\/codeload.github.com\/google\/glog\/tar.gz\/v0.3.4<br \/>\n\u4e0b\u8f7d\u5b8c\u6bd5\u540e \u653e\u5165\/Users\/YOUCOUNT\/.rncache<br \/>\n2\u3001\u5f00\u542f\u4e86\u5168\u5c40\u6a21\u5f0f\u7684\u5899\uff0cdelete node_modules\u518d\u4ece\u65b0\u6267\u884c\u4e00\u8fb9\u5b89\u88c5<br \/>\n3\u3001building\u524d\u518d\u5207\u6362\u5899\u81ea\u52a8\u4ee3\u7406\u6a21\u5f0f\uff08\u4e0d\u7136\u4f1a\u6709\u5751\uff0c\u6bd4\u5982make sure you\u2019re running a packager server or have included a .jsbundle file in your application bundle\u7684\u9519\u8bef\uff09<\/p>\n<p>\u7f3a\u5931\u54ea\u4e9b\u6587\u4ef6\u5c31\u5728google\u7684codeload\u91cc\u9762\u627e\u5bf9\u5e94\u7248\u672c\u4e0b\u8f7d\u3002<\/p>\n<h3><strong>\u67e5\u770b\u8be6\u7ec6\u7684Xcode\u7f16\u8bd1\u9519\u8bef<\/strong><\/h3>\n<p>\u5de6\u4fa7\u70b9\u51fb\u8ddf\u9879\u76ee\u76ee\u5f55 -&gt; \u9009\u62e9\u53f3\u4fa7 Build Settings -&gt; \u9009\u62e9 All &amp; Combined -&gt; \u641c\u7d22\u6846\u8f93\u5165 Always Search User Paths -&gt; \u5c06 Always Search User Paths \u8bbe\u7f6e\u4e3a Yes -&gt; Clean -&gt; Build<\/p>\n<p><a href=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/666666.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-276\" src=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/666666.jpg\" alt=\"\" width=\"2262\" height=\"1066\" \/><\/a><\/p>\n<h2><\/h2>\n<h2><strong>make sure you\u2019re running a packager server or have included a .jsbundle file in your application bundle<\/strong><\/h2>\n<p><a href=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/333333333331.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-279\" src=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/333333333331.jpg\" alt=\"\" width=\"164\" height=\"300\" \/><\/a><\/p>\n<p>\u57fa\u672c\u9047\u5230\u6b64\u7c7b\u9519\u8bef\u5c31\u662f\u6ca1\u6709\u6b63\u786e\u7684\u7ffb wa11\uff0c\u53bb\u628a\u6b64\u5904Mac\u4e2d\u7528\u4e8e\u79d1\u5b66\u4e0a\u7f51\u7684shadowocks\u4e2d\u7684\u7f51\u7edc\u4ee3\u7406\uff0c\u4ece \u5168\u5c40\u4ee3\u7406 \u6539\u4e3a \u81ea\u52a8\u4ee3\u7406\u6a21\u5f0f \u5373\u53ef<br \/>\n<a href=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/222221.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-280\" src=\"http:\/\/yusemo.com\/wp-content\/uploads\/2017\/07\/222221.jpg\" alt=\"\" width=\"428\" height=\"702\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u6363\u9f13\u4e0brn\uff0c\u521a\u5165\u95e8\u5c31\u4e00\u5806\u9519\u8bef\u5e76\u4e14\u518dxcode\u91cc\u9762\u5c55\u793a\u770b\u5230\u4e00\u5934\u96fe\u6c34\u3002\u7f51\u4e0a\u8d44\u6599\u4e0d\u662f\u5f88\u591a\uff0c\u5bf9\u4e8e\u524d\u7aef\u6765\u8bf4\u7b80\u76f4\u5c31\u662f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/yusemo.com\/index.php?rest_route=\/wp\/v2\/posts\/272"}],"collection":[{"href":"https:\/\/yusemo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yusemo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yusemo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yusemo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=272"}],"version-history":[{"count":6,"href":"https:\/\/yusemo.com\/index.php?rest_route=\/wp\/v2\/posts\/272\/revisions"}],"predecessor-version":[{"id":284,"href":"https:\/\/yusemo.com\/index.php?rest_route=\/wp\/v2\/posts\/272\/revisions\/284"}],"wp:attachment":[{"href":"https:\/\/yusemo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yusemo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yusemo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}