将问题/问题设置为重复之前,请先阅读它。毕加索未加载HTTP Facebook链接(未重复)
我知道这是一个已知的问题,在Stackoverflow和Github上的问题上存在大量问题,但相信我,我尝试了所有这些。
发行
不加载此链接:
https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/13872950_1066865640060722_8272182690153279858_n.jpg?oh=66a4ff80019c1fbf79bee45d32f03468&oe=59F65F50
我的代码
Target target = new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
userPicture.setImageDrawable(FunctionUtil.roundBitmap(bitmap));
}
@Override
public void onBitmapFailed(Drawable errorDrawable) {
Resources resources = getContext().getResources();
Bitmap bitmap = BitmapFactory.decodeResource(resources, R.drawable.ic_image_content_error);
userPicture.setImageDrawable(FunctionUtil.roundBitmap(bitmap));
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable) {
Resources resources = getContext().getResources();
Bitmap bitmap = BitmapFactory.decodeResource(resources, R.drawable.ic_image_placeholder);
userPicture.setImageDrawable(FunctionUtil.roundBitmap(bitmap));
}
};
Picasso.with(getContext()).load(me.getPicture().getUrl()).into(target);
我曾尝试
没有缓存: Picasso.with(getContext()).load(me.getPicture().getUrl()).memoryPolicy(MemoryPolicy.NO_CACHE).networkPolicy(NetworkPolicy.NO_CACHE).into(target);
最新下载:
`new Picasso.Builder(getContext()).downloader(new OkHttpDownloader(getContext())).build().load(me.getPicture().getUrl()).into(target);`
BOTH:
`new Picasso.Builder(getContext()).downloader(new OkHttpDownloader(getContext())).build().load(me.getPicture().getUrl()).memoryPolicy(MemoryPolicy.NO_CACHE).networkPolicy(NetworkPolicy.NO_CACHE).into(target);`
我在做什么错?
使用'Picasso.Listener'来查看触发了什么样的异常:https://stackoverflow.com/a/30628461/115145 – CommonsWare
永远不要点击Listener,所以我会说没有异常被抛出。 –