如何获取 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 也保持沉默。添加了互联网权限。
感谢帮助。
EDIT
issue : 毕加索图书馆今天停止使用 Facebook 图图片链接
我遇到了同样的问题,我通过以下方式解决了它:
The 全局实例监听器接收向上游报告崩溃报告服务或分析服务的 HTTP 异常。
关于:https://github.com/square/picasso/issues/379
public class MyClass implements Picasso.Listener {
@Override
public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {
// Display the exception
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)