UIL 从外部网址加载 AVD 中的图像但不在设备中

UIL load images in AVD from external urls but doesn't in device

我正在使用 UIL 从外部 URL 加载图像,它在 AVD 中工作正常。

imageLoader.init(ImageLoaderConfiguration.createDefault(mContext)); 
imageLoader.displayImage("http://proyectocupones.hol.es/fotos/discount.jpg", holder.image);

我在 "Java Build Path" 中检查了 UIL 库,并在我的 AndroidManyfest 中检查了互联网权限:

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

知道错误可能出在哪里吗?

我尝试使用以下方法为播放器设置图像并且成功了。试试这个方法。

 ImageLoader.getInstance().displayImage("Image URL","thumbImageView");

您可以在连接到 PC 时尝试调试 Phone 并检查 logcat 以查看输出内容和问题所在。
也许您没有在 phone(?)

上启用互联网

我终于找到了自己的答案:

Github

升级UIL库就解决了这个错误(好像是1.87版本的bug)

谢谢!

使用 Glide 而不是 UIL 库。