Android 毕加索,错误原因

Android picasso, error reason

如何在 picasso 中获取错误描述:

    Picasso.with(context)
        .load(getUrl())
        .placeholder(R.drawable.user_thumbnail_big)
        .error(android.R.drawable.ic_dialog_alert)
        .into(viewModel.userImg);

Callback onError(https://square.github.io/picasso/javadoc/index.html) 方法也没有提供任何参数,我得到错误图像,但无法弄清楚为什么,logcat 也是沉默的。已添加 Internet 权限。

感谢您的帮助。

编辑

问题:Picasso library stopped working today with facebook graph picture links

我遇到了同样的问题,我通过 :

解决了它

The global instance listener receives HTTP exceptions for reporting upstream to a crash reporting service or analytics service.

问候: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
    }
}