Android picasso cause of error

How to get picasso error description:

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

The callback onError( https://square.imtqy.com/picasso/javadoc/index.html ) method also does not provide any arguments, I get images with errors, t figureout why, logcat also does not work. Added access to the Internet.

Thanks for the help.

EDIT

issue: Picasso library stopped working today with image links on facebook

+4
source share
1 answer

I had the same problem that I solved:

The global instance listener receives HTTP exceptions for sending reports to the 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
    }
}
+6

Source: https://habr.com/ru/post/1570151/


All Articles