用firebase滑行不加载图片

时间:2017-09-09 15:03:46

标签: android firebase firebase-storage android-glide

使用firebase-glide时我的图像不会加载。我尝试了几件事,包括:更改firebase存储版本,将圆形图像视图更改为实际的图像视图以及使用文件的修复文件路径。

imageview的:

 <de.hdodenhof.circleimageview.CircleImageView
            android:id="@+id/Profilepicture"
        android:layout_margin="10dp"
        android:layout_width="150dp"
        android:layout_height="150dp"
       />

滑翔:

Profilepicture = (ImageView) rootView.findViewById(R.id.Profilepicture);
        FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();

        if (user != null) {
            Userid = user.getUid();
            profilepictureRef = mStorageRef.child("images/"+ Userid);
            Glide.with(this)
                    .using(new FirebaseImageLoader())
                    .load(profilepictureRef)
                    .into(Profilepicture);

        } else {
            // No user is signed in
        }

Build.gradle(app module)

apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
    compileSdkVersion 26
    buildToolsVersion '25.0.2'

    defaultConfig {
        applicationId "com.example.sanchez.testproject"
        minSdkVersion 21
        targetSdkVersion 26
        multiDexEnabled true
        versionCode 0
        versionName "0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }
}



dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:design:25.3.1'
    compile 'com.github.bumptech.glide:glide:3.8.0'
    compile 'com.firebaseui:firebase-ui-storage:2.0.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.google.firebase:firebase-auth:10.2.4'
    compile 'com.google.android.gms:play-services-auth:10.2.4'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.google.android.gms:play-services:10.2.4'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.jakewharton:butterknife:8.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:multidex:1.0.1'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:exifinterface:25.3.1'
    compile 'com.google.firebase:firebase-storage:10.2.4'
    compile 'com.google.firebase:firebase-database:10.0.1'
    testCompile 'junit:junit:4.12'
    apt 'com.jakewharton:butterknife-compiler:8.1.0'
}

apply plugin: 'com.google.gms.google-services'

也许有些依赖者并不适合。

我可以尝试解决这个问题?

0 个答案:

没有答案