最佳答案
我得到了错误
< p > gettingdocuments.com.google.firebase.firestore.FirebaseFirestoreException: . PERMISSION_DENIED:缺少或权限不足
对于下面关于else语句的代码
db.collection("users")
.get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
for (DocumentSnapshot document : task.getResult()) {
s(document.getId() + " => " + document.getData());
}
} else {
s("Error getting documents."+ task.getException());
}
}
});