2

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??

Leon
  • 307
  • 3
  • 16

2 Answers2

0

Try this

File f = new File(uri)

Picasso.with(context).load(f).into(imageView);

or

Picasso.with(context)).load(uri).into(imageView);
mitesh makwana
  • 269
  • 3
  • 11
0

find the problem, using implementation 'com.squareup.picasso:picasso:2.71828' instead of importing picasso aar file, that will fix the issue. Could you someone tell me what difference between implementation and importing aar file?

Leon
  • 307
  • 3
  • 16