今天在安装react-native时遇到了问题:conld not connect to development server,百度到相同的问题,有一个是说重装watchman可以解决,
具体代码是:
brew uninstall --force watchman
brew install --HEAD watchman
我试了一下不管用,后面看到一个帖子说真机调试要把localhost换成虚拟主机的具体地址,但是我没有在真机运行,也没有开虚拟机,只是在本机运行,不知道为什么会这样子。死马当活马医,试一下将Appdelegate.m文件中的localhost改成127.0.0.1,然后再运行就可以了。