Unable to use FirebaseRecyclerAdapter

2019-08-02 00:30发布

I am getting cannot resolve FirebaseRecyclerAdapter when trying to use it even after adding firebase ui in gradle dependency.Thanks in advance

5条回答
贪生不怕死
2楼-- · 2019-08-02 00:32

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.

查看更多
不美不萌又怎样
3楼-- · 2019-08-02 00:35

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'

Adding dependency in build.graddle (module:app)

Also add the import in .java file where you're trying to declare it.

import com.firebase.ui.database.FirebaseRecyclerAdapter;
查看更多
迷人小祖宗
4楼-- · 2019-08-02 00:38

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'

查看更多
Rolldiameter
5楼-- · 2019-08-02 00:41

In your app level gradle:add the following firebase dependency

    dependencies {
 compile'com.firebaseui:firebase-ui-database:1.1.1'
查看更多
我只想做你的唯一
6楼-- · 2019-08-02 00:46

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;?

查看更多
登录 后发表回答