问题
I am getting cannot resolve FirebaseRecyclerAdapter when trying to use it even after adding firebase ui in gradle dependency.Thanks in advance
回答1:
Can you show your build.gradle
file?
Also, have you tried putting this under your package name in your java class: import com.firebase.ui.database.FirebaseRecyclerAdapter;
?
回答2:
I was getting the same issue, it's resolved by adding the firebase-ui dependency in build.gradle (module:app)
compile 'com.firebaseui:firebase-ui-database:0.4.0'
Also add the import in .java file where you're trying to declare it.
import com.firebase.ui.database.FirebaseRecyclerAdapter;
回答3:
In your app level gradle:add the following firebase dependency
dependencies {
compile'com.firebaseui:firebase-ui-database:1.1.1'
回答4:
The dependencies quoted above don't seem to work anymore. After about an hour of searching online, I found this; hopefully it helps someone. It certainly fixed my problem:
compile 'com.firebaseui:firebase-ui:0.4.3'
回答5:
Use exactly the matched version of FireBaseRecyclerAdapter
to the Versions that you have included in gradle for the Firebase Database.
This link will surely help you
https://github.com/firebase/FirebaseUI-Android
In this link, you will find the matched Firebase dependency according to the version.
回答6:
Go to build.gradle
file, add a dependency (get the latest one from here https://github.com/firebase/FirebaseUI-Android)
The latest one on 5 October 2019 is implementation 'com.firebaseui:firebase-ui-database:6.0.2'
来源:https://stackoverflow.com/questions/39083826/unable-to-use-firebaserecycleradapter