See below codes
Picasso.get().load(crop_image_uri.toString())
.placeholder(R.drawable.header_img).into(app_bar_image);
It will not load image, but if using below code
app_bar_image.setImageURI(crop_image_uri);
it will be fine and load image properly.
Below is crop_image_uri
E/crop_image_uri: file:///data/user/0/com.example.yaniu.viewpagertransitiondemo/files/song_app_bar_image.jpg
Why Picasso not load uri file??
答案 0 :(得分:0)
试试这个
File f = new File(uri)
Picasso.with(context).load(f).into(imageView);
或
Picasso.with(context)).load(uri).into(imageView);
答案 1 :(得分:0)
找到问题,使用实现' com.squareup.picasso:picasso:2.71828'而不是导入毕加索aar文件,这将解决问题。你能告诉我实现和导入aar文件有什么区别吗?