【发布时间】:2017-10-07 21:54:20
【问题描述】:
我尝试将数据添加到 Firebase Firestore 测试版数据库,但收到以下错误消息: FAILED_PRECONDITION:该项目未启用 Cloud Firestore API
有人可以帮忙吗?
谢谢
【问题讨论】:
标签: android firebase google-cloud-firestore
我尝试将数据添加到 Firebase Firestore 测试版数据库,但收到以下错误消息: FAILED_PRECONDITION:该项目未启用 Cloud Firestore API
有人可以帮忙吗?
谢谢
【问题讨论】:
标签: android firebase google-cloud-firestore
如果你有这样的东西......
Stream closed with status:
code=FAILED_PRECONDITION,
description=The Cloud Firestore API is not enabled for the project firebase-androchat, cause=null
com.google.firebase.firestore.FirebaseFirestoreException:
FAILED_PRECONDITION: The Cloud Firestore API is not enabled for the project firebase-androchat
您可能需要通过https://console.firebase.google.com激活Cloud Firestore Beta
在您的项目中,您必须选择 Cloud Firestore Beta 并按照有关规则的说明进行操作!
此外,从您的项目设置中,您必须导出 "google-services.json" 文件并将其复制到 "app 文件夹"
希望对您有所帮助。
【讨论】:
您能否详细说明您面临的问题?
您需要启用 Firebase 控制台中的实时数据库:https://console.firebase.google.com 在数据库部分屏幕的左上角,您将看到需要启用的 Cloud Firestore BETA。
有关如何连接和启用离线数据的更多信息
那么这个链接可以帮助你更多https://cloud.google.com/firestore/docs/manage-data/enable-offline
【讨论】: