错误 http://createerror@http//localhost:8081/index.bundle?platform=android&dev=true&minify=false:100129:26handle

问题描述

我是本机反应的新手,但是我的机器上的虚拟模拟器很重,所以我决定在我自己的设备上模拟它,但是在尝试使用我的后端项目时,这个错误已经出现:

Possible Unhandled Promise Rejection (id: 0):
Error: Network Error
createError@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:100129:26
handleError@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:100033:27
dispatchEvent@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:32348:31
setReadyState@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:31432:33
__didCompleteResponse@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:31248:29
emit@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:3537:42
__callFunction@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2765:36
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2497:31
__guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2719:15
callFunctionReturnFlushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2496:21
callFunctionReturnFlushedQueue@[native code]

我使用具有以下配置的 api.js


import axios from 'axios';

const api = axios.create({
  baseURL: 'xxx.xxx.x.xx',/* <---  My IP */
});

export default api;

不知道有没有其他人遇到过同样的错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)