美文网首页
react native环境搭建异常总结

react native环境搭建异常总结

作者: iOS大神进阶 | 来源:发表于2017-07-05 15:42 被阅读0次

环境搭建参考:http://www.cnblogs.com/jianglan/p/5027315.html

参考:http://vanessa.b3log.org/articles/2017/06/12/1497235254333.html

1、RCTBundleURLProvider.h file not found 等file not found类问题

左侧点击跟项目目录 -> 选择右侧 Build Settings -> 选择 All & Combined -> 搜索框输入 Always Search User Paths -> 将 Always Search User Paths 设置为 Yes -> Clean -> Build

或(不推荐):添加link:Link Binary with Library-->Add Other --> node_modules -> react-native -> React -> Base -> RCTBundleURLProvider.h

2、'boost/iterator/iterator_adaptor.hpp' file not found产生原因:

*/Users/Vanessa/.rncache 中 boost_1_63_0.tar.gz, double-conversion-1.1.5.tar.gz, folly-2016.09.26.00.tar.gz, glog-0.3.4.tar.gz 文件下载不完整

*node_modules/react-native/third-party 文件不完整

解决方案:

1.删除 .rncache 后重新下载,或[手动下载](https://pan.baidu.com/s/1geLl5tT)后放入 .rncache 中2.把以上文件解压后放入 node_modules/react-native/third-party 下

3.Clean & Build

大坑:以上问题后来发现是终端创建工程很慢,没创建完全而导致上面的问题。大概如下图所示时,项目可以运行了

相关文章

网友评论

      本文标题:react native环境搭建异常总结

      本文链接:https://www.haomeiwen.com/subject/hjrqhxtx.html