【发布时间】:2022-01-16 15:28:59
【问题描述】:
我正在尝试使用我在 firebase 网站上找到的这段代码 Here
不仅如此,其他人还使用 Date() 作为他们代码的一部分,并且由于某种原因它给了我错误。这是我在代码上遇到的错误。
这是我的进口:
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
对此的任何解决方案将不胜感激。我相信错误与 Date 的导入一致。
【问题讨论】:
-
@Vega 类似的错误,但不一定解决我在其中使用 Timestamp 和 Date() 时遇到的问题。根据我的发现,它似乎是一个包,不知道该包到底有什么问题,因为我对 kotlin 有点陌生,因此这些帖子都没有完全解决我的问题。其中两个我以前遇到过。
-
为此,您需要先发布minimal reproducible example。码图没用,不够用
标签: android firebase kotlin google-cloud-firestore