当我使用react-native init(RN版本0.29.1)创建一个全新的项目并将提取内容放入公共Facebook演示电影API的render方法中时,它将引发Network Request Failed。堆栈跟踪非常无用,我无法在chrome控制台中调试网络请求。这是我要发送的内容:
fetch('http://facebook.github.io/react-native/movies.json')
.then((response) => response.json())
.then((responseJson) => {
return responseJson.movies;
})
.catch((error) => {
console.error(error);
});
http- > https(如果可能)将最有可能解决您的问题
192.168.1.25:3000,ifconfig而没有将服务器绑定到该IPrails server --binging=192.168.1.25 --port=3000