使用FirebaseUI下载图像

时间:2017-07-16 06:47:21

标签: android firebase firebase-storage firebaseui

我试图添加到我的项目firebase-ui-storage

The latest version is: firebase-ui-storage:2.0.1

但是当用这些添加它时:

compile 'com.google.android.gms:play-services-auth:11.0.2'
    implementation 'com.google.firebase:firebase-auth:11.0.2'
    compile 'com.google.firebase:firebase-database:11.0.2'

它抱怨存储是11.0.1,当我尝试运行代码时,我得到多个dex文件... 是否有新版本的firebase-ui-storage:2.0.1

我想实现这个

First, add FirebaseUI to your app/build.gradle:

dependencies {
    // FirebaseUI Storage only
    compile 'com.firebaseui:firebase-ui-storage:0.6.0'
}
Then you can load images directly from Storage into an ImageView:

// Reference to an image file in Firebase Storage
StorageReference storageReference = ...;

// ImageView in your Activity
ImageView imageView = ...;

// Load the image using Glide
Glide.with(this /* context */)
        .using(new FirebaseImageLoader())
        .load(storageReference)
        .into(imageView);

1 个答案:

答案 0 :(得分:0)

请在更改版本号后尝试。

compile 'com.google.android.gms:play-services-auth:11.0.2'

compile 'com.google.android.gms:play-services-auth:11.0.1'

选中link