2017-10-07 253 views
-2

我嘗試將數據添加到火力地堡公司的FireStore測試數據庫,我得到以下ERRE消息: FAILED_PRECONDITION:雲API的FireStore沒有爲項目火力地堡公司的FireStore錯誤

任何人都可以在此幫助啓用?

感謝

回答

0

你能否解釋更多地瞭解你所面臨的問題?

您需要啓用實時數據庫是在你的火力地堡控制檯:在數據庫部分,你會看到雲計算公司的FireStore BETA這需要啓用屏幕的左上角https://console.firebase.google.com

有關如何連接和啓用脫機數據

工作的詳細信息,然後這個鏈接可以幫助您更https://cloud.google.com/firestore/docs/manage-data/enable-offline

    -
+0

您是否還在項目級別gradle中添加了以下內容:maven {「url」https://maven.google.com「 }」在存儲庫部分中? –

+0

我認爲所有事情都是第一次正確設置和啓用,但我剛剛刪除了Firebase項目,重新創建了它,啓用了電子郵件身份驗證和Cloud Firestore,並用新的項目替換了google-services.json文件...之後,一切開始正常工作。當我第一次啓用它時,Firebase控制檯上只有標題(DATA,RULES,INDEXES,USAGE)以及它們下面沒有任何信息......我認爲這是Cloud Firestore的內部錯誤,它仍然是Beta。 –

0

,如果你有這樣的出頭...

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 

enter image description here

也許你需要激活雲公司的FireStore貝塔https://console.firebase.google.com

enter image description here

enter image description here

到你的項目,你必須選擇雲公司的FireStore測試版,並按照有關規則的指導!從項目的設置

Futhermore你擁有自營出口「谷歌services.json」文件,並在「app文件夾」複製

enter image description here

希望這有助於。

+0

我得到相同的錯誤,然後在我的項目上啓用Firebase之後,我收到錯誤「此項目包含雲數據存儲數據庫並且不支持Cloud Firestore API調用」。但是,我從未啓用Cloud Datastore,只是啓用了Firestore,並且我沒有在本地代碼中使用Datastore,也沒有在控制檯中啓用它。有關解決方法的任何想法? –

+0

我也有相同的問題/錯誤:(節點:38500)UnhandledPromiseRejectionWarning:未處理的承諾拒絕(拒絕標識:2):錯誤:此項目包含雲數據存儲數據庫並且不支持Cloud Firestore API調用 – Santosh