SocketException: Failed host lookup: 'dimg04.c-ctrip.com'
来源:8-5 自定义AppBar实现滚动渐变【另起炉灶】
QM启梦科技
2019-07-16
为什么我获取图片的时候利用Image.network之后会报这种错误:
Another exception was thrown: SocketException: Failed host lookup: ‘dimg04.c-ctrip.com’ (OS Error: No address associated with ho
stname, errno = 7)
swiper是这么写的:
List _imageUrls = [
'http://pages.ctrip.com/commerce/promote/20180718/yxzy/img/640sygd.jpg',
'http://dimg04.c-ctrip.com/images/700u0r000000gxvb93E54_810_235_85.jpg',
'http://dimg04.c-ctrip.com/images/700c10000000pdili7D8B_780_235_57.jpg'
];
child: Swiper(
itemCount: _imageUrls.length,
autoplay: true,
itemBuilder: (BuildContext context, int index) {
return Image.network(
_imageUrls[index],
fit: BoxFit.fill,
);
},
pagination: SwiperPagination(),
),
写回答
2回答
-
QM启梦科技
提问者
2019-07-16
我知道了,是虚拟机的地址发生了转变。将虚拟机关闭重启虚拟机再启动项目就好了。
20 -
weixin_慕圣4150750
2021-03-10
遇到了一摸一样的问题,请问这个虚拟机重启的这个怎么操作啊
00
相似问题