Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

resolveUri failed on bad bitmap uri (Android studio)

Tags:

java

android

I'm trying to get an image from the firebase db and assign it to an imagebutton to preview it but i get the fail "resolveUri failed on bad bitmap uri" Here my related codes:

var_resim2=dataSnapshot.child("user_resim").getValue().toString(); 
Uri my_resim = Uri.parse(var_resim2);
kul_resim.setImageURI(my_resim); 

What do i do wrong?

like image 326
Chris Elvis Avatar asked Sep 01 '25 01:09

Chris Elvis


1 Answers

using Picasso lib is the best way : add this to your gradle

compile 'com.squareup.picasso:picasso:2.5.2'

then

Picasso.with(this).load(var_resim2).into(kul_resim);

or you need to download and then set it to the ImageView

like image 89
Oussema Aroua Avatar answered Sep 02 '25 15:09

Oussema Aroua