Why Firestore Recycler Options showing error?

Viewed 917

It is showing error here

FirestoreRecyclerOptions<firestorereycler> allfirestorerecycler= new FirestoreRecyclerOptions.Builder<firestorereycler>()
            .setQuery(QueryApni.firestorereycler.class)
            .build();

I am using this library

implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
2 Answers

If you add libraries , you will not get an error.

Go to AndroidStudio -> Tools -> Firebase -> Cloud Firestore. And follow steps. Everything will set automatically.

In addition , add this to build.gradle(Module:...) -> dependencies -----> implementation 'com.firebaseui:firebase-ui-firestore:7.1.1'

After these steps . Everything will be ok. I managed to run it after following these procedures.

As mentioned in Official Documentation setQuery() requires 2 arguments, a query and a class.

FirestoreRecyclerOptions<firestorereycler> allfirestorerecycler= new FirestoreRecyclerOptions.Builder<firestorereycler>()
            .setQuery(<QUERY>,QueryApni.firestorereycler.class)
            .build();
Related