滑行无法加载资源

滑行无法加载资源,第1张

概述我想使用滑行从服务器加载图像时遇到问题这是我的代码Glide.with(ImagePreviewActivity.this).load(path).into(img);这是logcat:W/Glide:Loadfailedforhttp://localhost/AndroidFileUpload/file/IMG_20171128_153602.JPEGwithsize[720x1120]

我想使用滑行从服务器加载图像时遇到问题

这是我的代码

GlIDe.with(ImagePrevIEwActivity.this).load(path).into(img);

这是logcat:

W/GlIDe: Load Failed for http://localhost/AndroIDfileUpload/file/img_20171128_153602.JPEG with size [720x1120]                                                    class com.bumptech.glIDe.load.engine.GlIDeException: Failed to load resource                                                      Cause (1 of 1): class com.bumptech.glIDe.load.engine.GlIDeException: Fetching data Failed, class java.io.inputStream, REMOTE                                                        Cause (1 of 1): class com.bumptech.glIDe.load.engine.GlIDeException: Fetch Failed                                                          Cause (1 of 1): class java.net.ConnectException: Failed to connect to localhost/127.0.0.1 (port 80) after 2500ms: isConnected Failed: ECONNREFUSED (Connection refused)

如何解决这个问题?任何建议,将不胜感激,谢谢.

解决方法:

从日志中检查此行

class java.net.ConnectException: Failed to connect to
localhost/127.0.0.1

这意味着您的映像路径在本地主机上.无法从您的设备访问本地主机.这可能会引起问题.因此,滑行无法加载图像.

总结

以上是内存溢出为你收集整理的滑行无法加载资源全部内容,希望文章能够帮你解决滑行无法加载资源所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1081054.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存