Unable to use FirebaseRecyclerAdapter

谁都会走 提交于 2019-12-23 03:18:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!