搜索了很多网站,我还没有找到答案。
图像不是从 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 类,你将使用它来代替你的 Glide 静态调用。
尝试:
GlideApp.with(ActPhotoViewing.this.getApplicationContext())
.load(spaceRef)
.into(showImg);
如果您遇到找不到 GlideApp 的错误,请确保您按照此处的说明进行操作 https://github.com/firebase/FirebaseUI-Android/tree/master/storage .然后清理/重建您的项目。
关于java - Firebase Glide 不显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50414631/