Reputation: 1385
I'm running into an issue where on some devices (non-nexus devices) on varying versions of Android (KitKat and Marshmellow) are always throwing an error when I try to use picasso to load an image into an image view. I have no idea what I'm doing wrong, it provides no error message other than calling the "onError" method.
Things I've checked:
The code:
picasso.setLoggingEnabled(true);
picasso.load(mSourceImageUrl)
.resize(mWidthPx, mHeightPx)
.centerCrop()
.error(R.drawable.shape_rounded_rectangle_gray)
.placeholder(R.drawable.shape_rounded_rectangle_gray)
.into(imageView, new Callback() {
@Override
public void onSuccess() {
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& onSuccess");
}
@Override
public void onError() {
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& onError");
}
});
Upvotes: 0
Views: 462
Reputation: 281
What was image size? Generally Picasso dont load image of size >=1MB and show no error
Upvotes: 0
Reputation: 1385
This issue was solved by switching from Picasso to Glide. Worked on all of my test devices. I know my original question was relatively generic, but if you're encountering the same thing (picasso won't load your image and won't print an error) see if using a different library will help. Glide is very similar.
Upvotes: 1