android - Logcat 显示创建索引的链接,即使它已创建
问题描述
String[] group = {"A+", "B+", "O+", "AB+", "A-", "O-", "B-", "AB-"};
String[] child = {"19", "18", "17", "16", "15"};
CollectionReference collectionReference;
...................................................
.....................................................
@Override
protected void onCreate(Bundle savedInstanceState) {
....................................
groupPosition = intent.getIntExtra("groupPosition", 0);
childPosition = intent.getIntExtra("childPosition", 0);
.....................
getData1();
............................
}
private void getData1() {
collectionReference = db.collection(group[groupPosition]);
collectionReference.whereEqualTo("batch", child[childPosition])
.whereEqualTo("status", "Resident").whereGreaterThan("days",120).addSnapshotListener(this, new EventListener<QuerySnapshot>() {
@Override
public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {
if(e!=null){
Log.d("Shuvo5", "onEvent: "+e);
}
............................
我是安卓新手。在使用 firebase firestore 时,我需要构建三个字段的查询。我在 logcat 消息的链接之后创建了索引。但是再次构建代码会显示相同的消息。这个没看懂,谁能解释一下?
这是错误消息:
这是数据库:
解决方案
推荐阅读
- html - 需要帮助将我的导航栏链接居中,因为在右侧添加了搜索栏。任何人?
- c - 将 void* 转换为没有 sprintf 或 C 库函数的 C 样式字符串
- python - 如何确保在我的代码(python)中只获得特定的输出?
- asp.net-core - 如何在 Asp.Net Core Razor 页面项目中使用 OData(无 MVC、API)
- c++ - 在没有任何锁的情况下加入另一个线程后是否需要内存围栏?
- sql - SQL - 在检查分区字段与另一个表中的值时,我可以使用分区吗?
- python - 如何使 QPlainTextEdit 宽度与 QTabWidget 内的小部件的宽度相匹配?
- docker - 从 Firebase/Google Cloud Functions 执行 Docker 容器
- python - 如何绘制并且只有几个选定的状态,而不是全部 50 个
- python - 继续循环,直到 API 响应不再包含特定密钥