【发布时间】:2020-10-07 00:02:56
【问题描述】:
嗨,当我尝试在文档引用中获取数据时,它给了我 For-loop range must have an 'iterator()' method error while using in for loop。我猜它看起来像 DocumentSnapshot!。
据我所知,它应该是 MutableList
fun firebase_read() {
if (mAuth.currentUser != null) {
val schedule_document = databsae.collection("schedules").document(mAuth.currentUser!!.phoneNumber.toString())
schedule_document.get().addOnSuccessListener { document ->
if (document != null) {
for (i in document) {
}
}
}
}
}
}
【问题讨论】:
标签: android firebase kotlin google-cloud-firestore