解决react-native run-ios报错问题--Print: Entry, ":CFBundleIdentifier", Does Not Exist

来源:互联网 发布:淘宝大学 老师 编辑:程序博客网 时间:2024/06/05 06:45

Mac环境下,在命令行中run-ios构建时报错:CFBundleIdentifier", Does Not Exist

打开XCode,进入.xcodeproj文件,运行,编译时报错:'boost/iterator/iterator_adaptor.hpp' file not found’

这个问题只在react native 0.45.0及以后的版本中出现,stackoverflow 上的各种方法均无效。

先贴出解决方法 如下:

这个问题产生原因:

/Users/你的用户名/.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、删除/user/你的用户名/.rncache目录下的boost_1_63_0。重新下载,下载网址http://www.boost.org/users/history/version_1_63_0.html

2、打开命令行工具,在项目目录下输入rm -rf node_modules && rm -rf ~/.rncache && yarn

3、npm install 

4、react-native upgrade 

5、react-native run-ios       


_______________________________________________________________________________________________

若以上方法无效,可采用下面的方法:

创建项目暂时先使用react-native init MyApp –version 0.44.3,指定某个版本。 
你可以使用–version参数(注意是两个杠)创建指定版本的项目。例如react-native init MyApp -version 0.44.3。注意版本号必须精确到两个小数点。







阅读全文
1 0
原创粉丝点击