1

I am trying to load png image from Firebase storage but i face a weird thing. I am using this dependency to my project

implementation 'com.firebaseui:firebase-ui-storage:3.2.2'

my project has FirebaseRecyclerAdapter to view the list from Firebase database

please take a look this code.

 @Override
            protected void onBindViewHolder(@NonNull holder holder, int position, @NonNull List model) {
                // other code that not needed to post

                // Reference to an image file in Cloud Storage
                StorageReference storageReference  = FirebaseStorage.getInstance().getReference().child("thumbnails/Untitled.png");

                Glide.with(context)
                        .using(new FirebaseImageLoader()) //"using()" got a red color
                        .load(storageReference)
                        .into(imageView);
            }

the weirdest thing is why I got the red color in that area? (using mothod) that says

Cannot resolve method 'using(com.firebase.ui.storage.images.FirebaseImageLoader)'

I've searching that issue to google but no luck, nothing was the same as my problem.

enter image description here

if i remove this

.using(new FirebaseImageLoader())

and try to run the app it won't load the image from firebase storage and I've got a logcat error

 E/GlideExecutor: Request threw uncaught throwable
                                                                   com.bumptech.glide.Registry$NoModelLoaderAvailableException: Failed to find any ModelLoaders for model: gs://sdakaraoke.appspot.com/thumbnails/Untitled.png
                                                                       at com.bumptech.glide.Registry.getModelLoaders(Registry.java:584)
                                                                       at com.bumptech.glide.load.engine.DecodeHelper.getLoadData(DecodeHelper.java:205)
                                                                       at com.bumptech.glide.load.engine.DecodeHelper.getCacheKeys(DecodeHelper.java:223)
                                                                       at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:42)
                                                                       at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
                                                                       at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:266)
                                                                       at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
                                                                       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1115)
                                                                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:590)
                                                                       at java.lang.Thread.run(Thread.java:818)
                                                                       at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
Zoe
  • 27,060
  • 21
  • 118
  • 148
basaya
  • 126
  • 1
  • 4
  • 13
  • 2
    Possible duplicate of [Using Firebase Storage image with Glide](https://stackoverflow.com/questions/48762263/using-firebase-storage-image-with-glide) – Peter Haddad Mar 25 '18 at 06:04

1 Answers1

1

Change 'com.firebaseui:firebase-ui-storage:' from 0.6.0 to 3.2.2

autostart_50
  • 40
  • 1
  • 10