我正在嘗試使用我在 firebase 網站上找到的代碼

這是我為此所做的進口:
import com.google.firebase.Timestamp
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.firestore.ktx.firestore
import com.google.firebase.ktx.Firebase
import com.google.type.Date
對此的任何解決方案將不勝感激。我相信該錯誤與帶日期的匯入一致。
uj5u.com熱心網友回復:
您匯入了錯誤的 Date 類。您的螢屏截圖顯示您正在使用com.google.type.Date,但 Firestore 的Timestamp 建構式只允許java.util.Date型別引數。更正您的匯入并重試。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/379828.html
標籤:安卓 火力基地 科特林 谷歌云firestore
