flutter:连接127.0.0.1报错咋办

avatar
作者
筋斗云
阅读量:4

在这里插入图片描述
E/flutter (31704): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DioException [connection error]: The connection errored: Connection refused This indicates an error which most likely cannot be solved by the library. E/flutter (31704): Error: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 51126 E/flutter (31704): #0 DioMixin.fetch (package:dio/src/dio_mixin.dart:519:7) E/flutter (31704): <asynchronous suspension> E/flutter (31704): #1 LoginFormState.build.<anonymous closure> (package:untitled11/main.dart:166:40) E/flutter (31704): <asynchronous suspension> E/flutter (31704):

I/flutter (32759): i **: DioException [connection error]: The connection errored: Connection refused This indicates an error which most likely cannot be solved by the library. I/flutter (32759): Error: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 51820

http://127.0.0.1:3006/api/login中的127.0.0.1换成下图选出来的部分👇
在这里插入图片描述

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!