Android,Picasso,Firebase存储 - 检索图像,ImageView上没有显示任何内容 [英] Android, Picasso, Firebase Storage - Retrieve Image, Nothing is being showed on ImageView

查看:130
本文介绍了Android,Picasso,Firebase存储 - 检索图像,ImageView上没有显示任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过使用Glide.with(opDetails.this).using(new FirebaseImageLoader())。load(uri).into(imgPhoto1);但是.using()有一些问题。
我现在正在尝试使用毕加索。 Althougt编译器显示没有错误,没有图像显示到ImageView,我不明白为什么。

I already tried using Glide.with(opDetails.this).using(new FirebaseImageLoader()).load(uri).into(imgPhoto1); but had some problems with .using(). I am now trying to use picasso. Althougt the compiler shows no error, no image is displayed to the ImageView and i cant understand why.

    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) {

        }
    });
}

更新:

Firebase存储图像

存储规则

在此先感谢。

推荐答案

试试这个: -

storageRef.child("images/4736af35-608d-4b97-95ba-029ef471c5eb").getDownloadUrl().addOnSuccessListener....

这篇关于Android,Picasso,Firebase存储 - 检索图像,ImageView上没有显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆