【发布时间】:2019-11-13 19:10:46
【问题描述】:
我在将 Xamarin Forms 链接到 Firestore 时遇到问题。我在 Firebase 的 Firestore 数据库中有一个名为 Candidates 的集合,我正在使用 Plugin.CloudFirestore nuget 来链接 Firestore 和 Xamarin 表单
我已尝试使用以下链接中的“获取”示例:
https://github.com/f-miyu/Plugin.CloudFirestore
var query = await CrossCloudFirestore.Current
.Instance
.GetCollection("Candidates")
.GetDocumentsAsync();
var documents = query.ToObjects<Candidate>();
当我运行代码时,我收到以下消息
“未处理的异常: Java.Lang.IllegalStateException:名为 [FirebasePlugin] 的 FirebaseApp 不存在。”
对出了什么问题有什么想法吗?
【问题讨论】:
-
主文件夹中有 google-services.json 吗?在使用 Plugin.CloudFirestore stackoverflow.com/a/60418014/5869384 之前,您可以查看这些说明
标签: firebase xamarin.forms google-cloud-firestore