【发布时间】:2021-07-22 14:33:56
【问题描述】:
在使用 expo 在 android 设备上运行我的 react 本机应用程序时,api 响应没有出现,这是使用 fetch 和 POST 方法完成的并收到此错误:
[未处理的承诺拒绝:TypeError:网络请求失败] 在 setTimeout$argument_0 中的 node_modules\whatwg-fetch\dist\fetch.umd.js:535:17 在 node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 在 _callTimer 在 node_modules\react-native\Libraries\Core\Timers\JSTimers.js:383:16 在 callTimers 在 __callFunction 中的 node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:416:4 在 __guard$argument_0 中的 node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:109:6 在 __guard 中的 node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 在 node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:108:4 在 callFunctionReturnFlushedQueue at [native code]:null in callFunctionReturnFlushedQueue
【问题讨论】:
标签: javascript android react-native fetch expo