Files
hexo-blog/source/_posts/react-native-for-ios-下的一个小坑.md
T
2020-11-23 18:59:26 +08:00

926 B

title, tags, id, categories, date
title tags id categories date
react native for ios 下的一个小坑
84
分享
2016-12-09 18:07:07

最近在尝试学习一下react native,然后就按照官网的教程一步步配置环境,一切都很顺利,但是在xcode下run的时候就报错了。


Error: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'bundleURL must be non-nil when not implementing loadSourceForBridge'

谷歌百度一系列之后,仍然无法解决,然后加了react native中文的官方群提问,有人说是开启了VPN导致,然而我的Mac并没有配置VPN,一切又回到原点。 然而受到这个启发,把之前写web dom时配置的 127.0.0.1 localhost 还原。神奇的事情发生了,Xcode里的项目跑起来了!喜大普奔,然而我也没搞懂这是为什么。


#host文件一定要有这个
127.0.0.1 localhost