关于react-native 运行项目中遇到could not connect to development server的问题

我在创建好react-native项目中,出现这样的问题。


关于react-native 运行项目中遇到could not connect to development server的问题_第1张图片
could not connect to development server

解决方案:
在ios项目中,info.plist文件中,添加

NSAppTransportSecurity

NSAllowsArbitraryLoads

让app支持http协议,这样问题就解决了。

你可能感兴趣的:(关于react-native 运行项目中遇到could not connect to development server的问题)