【发布时间】:2015-01-06 12:09:13
【问题描述】:
如何在 picasso 中获取错误描述:
Picasso.with(context)
.load(getUrl())
.placeholder(R.drawable.user_thumbnail_big)
.error(android.R.drawable.ic_dialog_alert)
.into(viewModel.userImg);
回调onError(https://square.github.io/picasso/javadoc/index.html) 方法也没有提供任何参数,我得到错误图像,但不知道为什么,logcat 也是沉默的。已添加 Internet 权限。
感谢您的帮助。
编辑
问题:Picasso library stopped working today with facebook graph picture links
【问题讨论】:
-
你设置了 viewModel.userImg 吗?检查 getUrl() 是否不返回 "" 或 null
标签: android picasso image-loading