Вам не хватает ссылки на коллекцию. т.е. db.collection (** Это становится нулевым **).

я есть следующий код и получаю ошибку:

Invalid collection reference. Collection references must have an odd number of segments

И код:

private void setAdapter() {
        FirebaseFirestore db = FirebaseFirestore.getInstance();
        db.collection("app/users/" + uid + "/notifications").get().addOnCompleteListener(task -> {
            if (task.isSuccessful()) {
                for (DocumentSnapshot document : task.getResult()) {
                    Log.d("FragmentNotifications", document.getId() + " => " + document.getData());
                }
            } else {
                Log.w("FragmentNotifications", "Error getting notifications.", task.getException());
            }
        });
    }

Ответы на вопрос(3)

Ваш ответ на вопрос