Android picasso, error reason
Asked Answered
M

1

5

How do I get error description in 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) method also doesn't provide any arguments, I'm getting error images, but can't figureout why, logcat is also silent. Internet permission added.

Thanks for help.

EDIT

issue : Picasso library stopped working today with facebook graph picture links

Micronesian answered 6/1, 2015 at 12:9 Comment(1)
did you set viewModel.userImg? check if getUrl() dont return "" or nullPuparium
C
7

I had the same problem I solved it through :

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

regards to : 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
    }
}
Continuate answered 6/1, 2015 at 12:18 Comment(3)
so add it where is the problem :PContinuate
You should add how to set the Listener on PicassoJamikajamil
My images didn't get loaded, but this Listener implemented in the same class did not get called. Using v2.5.2 with the problematic .fit().centerCrop()Saundrasaunter

© 2022 - 2024 — McMap. All rights reserved.