发生存储异常。对象在该位置不存在。存储 FireBase

新手上路,请多包涵

我想在 imageView 中显示图像,这就是我正在做的:我正在使用 FirebaseUI 显示来自 FireBase 存储的图像。

 FirebaseStorage storageDisplayImg;
StorageReference storageRef;
private FirebaseAuth auth;

        storageDisplayImg=FirebaseStorage.getInstance();
        auth = FirebaseAuth.getInstance();
        FirebaseUser userConnect = auth.getCurrentUser();
        String id_user=userConnect.getUid();
        storageRef = storageDisplayImg.getReference().child(item.getChemin_image()); // return gs://mydreambook-32321.appspot.com/images/test23-03-2017_16:46:55

        if (item.getChemin_image() != null&&id_user != null) {

           Glide.with(convertView.getContext() )
                   .using(new FirebaseImageLoader())
                   .load(storageRef)
                   .into(profilePic);
            profilePic.setVisibility(View.VISIBLE);

        } else {
            profilePic.setVisibility(View.GONE);
        }

但我有这个错误:

 StorageException has occurred.  Object does not exist at location.    Code: -13010 HttpResult: 404

更新,存储 FireBase 中的图像

在此处输入图像描述

原文由 Amal 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 359
1 个回答

我现在遇到了同样的问题,我意识到存储中的图像以 .jpg 结尾,但我的代码要求以 .png 结尾的地址。在我修复它之后,它对我来说运行完美。

原文由 alibabaei12 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题