Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to use the awesome Glide integration provided by FirebaseUI, but I am unable to do so.

I have followed everything described here: Downloading images with FirebaseUI

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

is the error that I am currently getting.

Are my settings good?

Here are the versions of the two libraries I am using:

  • Glide 4.0.0-RC1

  • FirebaseUI 2.0.1

And this is my gradle (app):

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile 'com.firebase:geofire-android:2.1.1'
    compile 'com.google.android.gms:play-services-location:11.0.1'
    compile 'com.android.support:design:25.3.1'

    implementation 'com.google.firebase:firebase-database:11.0.1'
    implementation 'com.android.support:cardview-v7:25.3.1'
    compile 'com.firebaseui:firebase-ui-storage:2.0.1'
    compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
    compile 'com.android.support:support-v4:25.3.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
    implementation 'com.google.firebase:firebase-storage:11.0.1'
    implementation 'com.google.firebase:firebase-auth:11.0.1'

}

apply plugin: 'com.google.gms.google-services'
like image 673
reavcn Avatar asked Jun 29 '17 18:06

reavcn


2 Answers

Unfortunately, FirebaseUI doesn't yet support Glide 4.0 so you have two options:

  1. Downgrade Glide to v3.8.0
  2. Write your own Glide Module. You can see my response here on how you would go about upgrading the FirebaseUI storage code.

This issue is being tracked here: https://github.com/firebase/FirebaseUI-Android/issues/731

Edit: As per link above, the issue has been resolved in version 3.0

like image 56
SUPERCILEX Avatar answered Nov 15 '22 09:11

SUPERCILEX


You must include firebase-ui-storage in your Gradle dependencies (/app/build.gradle) as follows:

dependencies {

    implementation 'com.firebaseui:firebase-ui-storage:6.2.1'
}

Check: last version of this library

And then import the package:

import com.firebase.ui.storage.images.FirebaseImageLoader;
like image 43
Tork Avatar answered Nov 15 '22 09:11

Tork