我想使用FirebaseUI RecyclerView。
我当前的应用(build.gradle)如下:
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
我的应用程序可以正常使用此设置,但是当我包含FirebaseUI时,就像在以下代码段中一样,我的应用程序崩溃并显示错误消息:" at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source )"
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.firebaseui:firebase-ui-database:3.2.1'
testImplementation 'junit:junit:4.12'
implementation 'com.squareup.picasso:picasso:2.71828'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
谢谢,
答案 0 :(得分:2)
您需要match firebase版本和firebase-ui版本。使用这些:
implementation 'com.firebaseui:firebase-ui-database:4.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'