问题描述

使用ImageLoader时,出现如下错误,始终加载图片错误,显示img_error的图片.UniversalAndroidImageLoader出现异常:ImageLoader: Unable to resolve host "https": No address associated with host

E/ImageLoader: failed to connect to https/183.221.250.11 (port 443) after 5000ms: isConnected failed: ECONNREFUSED (Connection refused)
java.net.ConnectException: failed to connect to https/183.221.250.11 (port 443) after 5000ms: isConnected failed: ECONNREFUSED (Connection refused)
at libcore.io.IoBridge.isConnected(IoBridge.java:267)
at libcore.io.IoBridge.connectErrno(IoBridge.java:191)
at libcore.io.IoBridge.connect(IoBridge.java:127)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:461)
at java.net.Socket.connect(Socket.java:918)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:174)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:282)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:216)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:391)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:341)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:509)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromNetwork(BaseImageDownloader.java:117)
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:88)
at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.getImageStream(BaseImageDecoder.java:98)
at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.decode(BaseImageDecoder.java:74)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage(LoadAndDisplayImageTask.java:265)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:238)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
at libcore.io.IoBridge.isConnected(IoBridge.java:252)
at libcore.io.IoBridge.connectErrno(IoBridge.java:191)?
at libcore.io.IoBridge.connect(IoBridge.java:127)?
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)?
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:461)?
at java.net.Socket.connect(Socket.java:918)?
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:174)?
at com.android.okhttp.Connection.connect(Connection.java:152)?
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:282)?
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:216)?
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:391)?
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:341)?
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:509)?
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)?
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)?
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromNetwork(BaseImageDownloader.java:117)?
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:88)?
at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.getImageStream(BaseImageDecoder.java:98)?
at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.decode(BaseImageDecoder.java:74)?
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage(LoadAndDisplayImageTask.java:265)?
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:238)?
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)?
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)?
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)?
at java.lang.Thread.run(Thread.java:818)?

错误解决

添加权限(权限未添加)

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

已添加权限,但仍旧出现异常

  • android进入应用管理,清除缓存,清除数据。
  • 或者直接下载该引用,重新上载。即可解决问题。

出现问题的原因

以后将做探讨

UniversalAndroidImageLoader出现异常:ImageLoader: Unable to resolve host "https": No address associated with host的更多相关文章

  1. can't run roscore 并且 sudo 指令返回 unable to resolve host

    I'm using ubuntu14 LTS. Problems: 1. When run roscore, got a mistake and an advice to ping the local ...

  2. sudo 出现unable to resolve host 解决方法

    inux 环境, 假设这台机器名字叫dev(机器的hostname), 每次执行sudo 就出现这个警告讯息:sudo: unable to resolve host dev虽然sudo 还是可以正常 ...

  3. 修改ubuntu DNS的步骤/wget url报错: unable to resolve host address的解决方法

    wget url 报错:unable to resolve host address ‘url’,显然是无法解析主机地址,这就能看出是DNS解析的问题.解决办法就是配置可用的dns 一般是修改成为谷歌 ...

  4. sudo: unable to resolve host xxx解决办法

    问题: root@wiki:~# sudo lsb_release -a sudo: unable to resolve host wiki No LSB modules are available. ...

  5. [待解决] sudo unable to resolve host

    怪哉怪哉, 大debian突然就出现了这个问题 , 问题的现象是只要使用 sudo 执行命令就会出现 sudo unable to resolve host </etc/hostname中的内容 ...

  6. sudo: unable to resolve host XXX 解决方法

    执行sudo命令时候,总是提示sudo: unable to resolve host xxx 解决方法: 法1. 在/etc/hosts/添加hosts映射, 如127.0.0.1 xxx 法2. ...

  7. Error prompt:“wget: unable to resolve host address”---Solution

    //Situation System prompts that:"wget: unable to resolve host address".   //Analysis   Una ...

  8. Ubuntu 报错 sudo: unable to resolve host

    Ubuntu 在每次执行命令的时候,会报如下错误: $ sudo sudo: unable to resolve host iZ2zecsdy8flu603bmdg1bZ iZ2zecsdy8flu6 ...

  9. ceph-deploy出错UnableToResolveError Unable to resolve host

    背景 ps:在本文中,假设我系统的hostname为node1. 使用ceph-deploy命令搭建Ceph集群,执行ceph new node1时,出现如下错误: [node1][INFO ] Ru ...

随机推荐

  1. web.xml中同一servlet/filter配置多个url-pattern

    转自:http://blog.sina.com.cn/s/blog_4c2c2a0c0100dh67.html 若你的servlet要多个地址,或你的filter需要过滤不同的url如有*.jsp,* ...

  2. 网站Session 处理方式

    分布式session有以下几种方案: 1. 基于nfs(net filesystem)的session共享 将共享服务器目录mount各服务器的本地session目录,session读写受共享服务器i ...

  3. matlab练习程序(碎片)

    这个算法是对photoshop中滤镜->像素化->碎片这个功能的学习. PS这个功能好像不带参数,不过我这里有滤波半径r可以进行控制. 因为我是看效果猜算法的,效果肯定有所区别. 我的想法 ...

  4. javascript的笔记精简版

    在写javascript的代码时一定要用单引号或者双引号括起来,不带引号的话就以字符串来处理 在javascript里面不能以纯数字或者click命名函数或者变量 要想修改标签的属性,在html里面怎 ...

  5. Popupwindow 的简单实用,(显示在控件下方)

    第一步: private PopupWindow mPopupWindow; 第二步:写一个popupwindow的布局文件XML <?xml version="1.0" e ...

  6. 分享Kali Linux 2016.2第46周镜像文件

    分享Kali Linux 2016.2第46周镜像文件Kali Linux官网在11月13日发布Kali Linux 2016.2的第46周镜像文件.这次还是保持以往的规模,总共提供了11个镜像文件. ...

  7. js兼容方法:事件添加|事件绑定|事件监听 addEvent

    function addEvent(obj,sEvent,fn){ if(obj.attachEvent){ obj.attachEvent("on"+sEvent,fn); }e ...

  8. mark元素

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. 将公司的主要项目从eclipse迁移到android studio for mac环境(1)

    上星期,我决定要解决这个问题.理由如下: 3个月之前,我已经投入一段时间要做好这个迁移工作,直到最后,我发现能够安装了,但是运行不了,这个过程也看不到bugly上传,在找不到原因的情况下,我放弃了. ...

  10. ccc array

    setInterval可以用来设置函数的执行频率 nodeList: { default:[], type:[cc.Node] } active 可以用来设置是否启用 cc.Class({ exten ...