【发布时间】:2018-12-29 17:58:17
【问题描述】:
我已经尝试过使用 Glide.with(opDetails.this).using(new FirebaseImageLoader()).load(uri).into(imgPhoto1);但是 .using() 有一些问题。 我现在正在尝试使用毕加索。虽然编译器没有显示错误,但 ImageView 没有显示图像,我不明白为什么。
storage = FirebaseStorage.getInstance();
storageRef = storage.getReference();
storageRef.child("images/4736af35-608d-4b97-95ba-029ef471c5eb.png").getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Picasso.with(opDetails.this).load(uri).into(imgPhoto1);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
}
});
}
更新:
提前致谢。
【问题讨论】:
-
您应该使用错误侦听器并查看显示的错误 - Picasso.with(opDetails.this).load(uri).into(imgPhoto1, new Callback() { @Override public void onSuccess() { } 公共无效 onError() { } });还要在 addOnFailureListener 中添加一个日志,以查看是否从数据库中正确获取了 uri。
-
它说 com.google.storage.StorageException: Object does not exist at location
-
这意味着存储图像可能存在问题。发送存储文件夹及其结构@NunoLeal
-
问题已更新@Raj
标签: android image firebase storage picasso