使用FirebaseListAdapter需要对Gradle进行哪些更改?

时间:2016-12-16 13:19:01

标签: android listview firebase firebase-realtime-database firebaseui

好吧,我已经完成了一个使用FirebaseListAdapter的项目,但是在最近的Firebase更新中我需要对依赖项进行哪些修改才能继续使用FirebaseListAdapter

我的上一个gradle(app)文件:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    /* Firebase SDK */
    compile 'com.firebase:firebase-client-android:2.4.0'

    /* Firebase UI */
    compile 'com.firebaseui:firebase-ui:0.2.2'

    /* For Google Play Services */
    compile 'com.google.android.gms:play-services-safetynet:8.3.0'
    compile 'com.google.android.gms:play-services-auth:8.3.0'
}

我的最后一个gradle文件:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'

        // NOTE: Do not place your application dependencies here; they      
        // in the individual module build.gradle files
    }
}

1 个答案:

答案 0 :(得分:1)

您必须添加此依赖项:

// FirebaseUI Database only
compile 'com.firebaseui:firebase-ui-database:1.0.1'

点击此处查看兼容性between versions

| FirebaseUI Version | Firebase/Play Services Version |
|--------------------|--------------------------------|
| 1.0.1              | 10.0.0                         |
| 1.0.0              | 9.8.0                          |
| 0.6.2              | 9.8.0                          |
| 0.6.1              | 9.6.1                          |
| 0.6.0              | 9.6.0                          |
| 0.5.3              | 9.4.0                          |
| 0.4.4              | 9.4.0                          |
| 0.4.3              | 9.2.1                          |
| 0.4.2              | 9.2.0                          |
| 0.4.1              | 9.0.2                          |
| 0.4.0              | 9.0.0                          |