无法解析符号" FirestoreRecyclerOptions "
dependencies {
implementation 'com.firebaseui:firebase-ui-auth:8.0.1'
implementation 'com.firebaseui:firebase-ui-database:8.0.1'
implementation 'com.facebook.android:facebook-login:8.1.0'
implementation 'androidx.fragment:fragment-ktx:1.5.5'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-storage:20.0.1'
implementation 'com.google.firebase:firebase-database:20.0.4'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.google.firebase:firebase-firestore-ktx:24.4.4'
testImplementation 'junit:junit:4.13.2'
implementation 'com.karumi:dexter:6.2.3'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
}
firestore=FirebaseFirestore.getInstance();
Query query=firestore.collection("playlist");
FirestoreRecyclerOptions<pagl> options = new FirestoreRecyclerOptions.Builder<pagl[enter image description here][1]>()
.setQuery(query, pagl.class)
.build();
您已经为实时数据库添加了对FirebaseUI的依赖,但是您的代码正在尝试将FirebaseUI用于云Firestore。虽然这两个数据库都是Firebase的一部分,但它们是完全独立的,其中一个的UI不能与另一个一起使用。
要使用FirebaseUI与Firestore,添加以下依赖项:
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:8.0.1'
请参阅安装FirebaseUI的文档。