您的位置:首页 > Web前端 > React

[React Native iOS真机运行输出]Could not connect to development server.

2016-05-18 15:50 639 查看
Could not connect to development server. Ensure the following:

- Node server is running and available on the same network - run ‘npm start’ from react-native root

- Node server URL is correctly set in AppDelegate

URL: http://localhost:8081/index.ios.bundle?platform=ios&dev=true

解决办法:

1.把AppDelegate.m里面的localhost改为你Mac的IP地址(获取方式:系统偏好设置-网络)。

2.确定你的Mac和手机连接的是同一个网络。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: