android - 如何在我的项目中使用 FirestorePagingAdapter 和选项?
问题描述
我正在尝试开始,FirestorePagingAdapter
并且FirestorePagingOptions
像这里一样仔细阅读了文档
https://github.com/firebase/FirebaseUI-Android/tree/master/firestore
并一步一步应用
1-
implementation 'android.arch.paging:runtime:1.x.x'
2-Query baseQuery = mItemsCollection.orderBy("value", Query.Direction.ASCENDING);
但是当我尝试添加FirestorePagingOptions
它时,它会出现在红线代码中,这意味着它没有很好地导入或实现,并且我没有使用任何 android 架构模型。经过大量搜索,我发现没有什么清楚的那么什么是正确的开始方式FirestorePagingAdapter
?我应该从什么开始?这是我的实现
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-core:16.0.3'
//google sign inj
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.firebase:firebase-firestore:15.0.0'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-messaging:17.3.0'
implementation 'com.google.firebase:firebase-storage:15.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.firebaseui:firebase-ui-firestore:3.3.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
//FIREBASE UI LIBRARY
implementation 'android.arch.lifecycle:runtime:1.1.1'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation 'android.arch.paging:runtime:1.0.1'
implementation 'android.arch.core:runtime:1.1.1'
implementation 'android.arch.core:common:1.1.1'
implementation 'android.arch.lifecycle:common-java8:1.1.1'
解决方案
可能现在回答已经太晚了。当我遇到完全相同的问题时,我到达了这个页面。
添加implementation 'com.firebaseui:firebase-ui-firestore:4.3.2'
到 gradle 依赖项解决了这个问题。
推荐阅读
- go - 通过 API Gateway 使用表单数据将图像发布到 Lambda 函数会导致文件无效
- google-bigquery - Google BigQuery:合并语句
- javascript - react-native FlatList 显示 - 顶部的空白
- wso2 - WSO2 ESB 还存在吗?
- html - 网格 - HTML | CSS
- sharepoint-2016 - 在 Sharepoint 2016 多服务器场中安装 Visual Studio
- node.js - 在快速验证器中验证对象数组
- c# - 在列表中动态插入查找字段
- ubuntu - 如何更新对现有 ImageMagick 的依赖
- highcharts - 如何在highChart中的0位置绘制虚线垂直线