Java Firestore查询可以从控制台工作,但不能从代码工作

Java Firestore查询可以从控制台工作,但不能从代码工作,java,android,google-cloud-firestore,Java,Android,Google Cloud Firestore,正如你在下面看到的,我得到了矛盾的结果。感谢所有的帮助 Firebase控制台查询 Firebase控制台查询结果 代码 代码日志 正在编辑,但保留以下内容供参考 在您的查询中,您要在Clacton on sea中查找小写的s,而您的数据库中有大写的s 这个代码实验室向您展示了如何 如果您运行的查询当前没有现有索引,则会在Logcat中显示一个URL,您可以使用该URL生成新索引。这通常需要在任何时候进行查询,以订购数据或合并各种运营商,例如==和我找到了此日志,并意识到我的手机已注销wifi。

正如你在下面看到的,我得到了矛盾的结果。感谢所有的帮助

Firebase控制台查询

Firebase控制台查询结果

代码

代码日志

正在编辑,但保留以下内容供参考

在您的查询中,您要在Clacton on sea中查找小写的s,而您的数据库中有大写的s

这个代码实验室向您展示了如何


如果您运行的查询当前没有现有索引,则会在Logcat中显示一个URL,您可以使用该URL生成新索引。这通常需要在任何时候进行查询,以订购数据或合并各种运营商,例如==和我找到了此日志,并意识到我的手机已注销wifi。我通过登录wifi修复了它,但是我有一个强大的4g连接,在任何应用程序上都不起作用。我通过重启手机解决了4g问题

W/Firestore: (21.3.1) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds

    This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.

你为它创建索引了吗?@RajasekaranM没有?请详细说明。是的,当然,如果我们在firestore中使用过滤器,我们必须创建索引query@RajasekaranM如何以及在哪里?您是否在firestore的日志中打印了错误?如果是的话,你可以找到索引的url,在我看来,这个查询确实有一个大写字母S。这里不需要索引,因为它只是一个字段过滤器,所有字段都会自动索引。哇……我一定看到了一些东西。很抱歉。
W/Firestore: (21.3.1) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds

    This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.