Firebase Glide 不显示图像

Firebase Glide not displaying image

搜索了很多网站,我还没有找到答案。

图片不是从 Firebase 上传的,老实说,我不知道它可能是什么。

提前致谢。

代码:

spaceRef = storageRef.child("Users/" + user.getEmail().toString() + "/images/Countries/Spain" /*+ chosenCountry*/);

            Glide.with(ActPhotoViewing.this.getApplicationContext())
                    .load(spaceRef)
                    .into(showImg);

.gradle

中的实现
implementation 'com.firebaseui:firebase-ui-storage:3.2.1'
implementation 'com.github.bumptech.glide:glide:4.4.0'

使用 FirebaseUI 时需要使用生成的 API。当你构建你的项目时,它应该生成一个 GlideApp class,你将使用它来代替你的 Glide 静态调用。

尝试:

    GlideApp.with(ActPhotoViewing.this.getApplicationContext())
            .load(spaceRef)
            .into(showImg);

如果您遇到找不到 GlideApp 的错误,请确保您按照此处的说明进行操作 https://github.com/firebase/FirebaseUI-Android/tree/master/storage。然后 clean/rebuild 你的项目。