將問題/問題設置爲重複之前,請先閱讀它。畢加索未加載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,所以我會說沒有異常被拋出。 –