为什么我的RecyclerView不显示我的适配器项目?

So i have a recycler view that is designed to show users sending messages to each other from my Firebase RTD. Originally it was working to show all users and the recycler items were clicked then it would show messages between the users. However, when modifying it to only view users that were in open messages with the current user, the items that populated my recycler view no longer displays and an error saying E/RecyclerView: No adapter attached; skipping layout is logged within the Run tab.

不幸的是,我再也无法撤消更改,并且一直在努力寻找导致问题的原因,但是我假设它是在我的适应班或活动班上发生的。

InboxActivity.java:

public class InboxActivity extends AppCompatActivity {

    private RecyclerView recyclerView;
    private List<User> inboxLst;

    FirebaseUser user;
    DatabaseReference reference;

    UserAdapter usrAdpt;

    private List<String> userLst;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_inbox);

        //Identify and setup recycler view
        recyclerView = findViewById(R.id.rycInbox);
        recyclerView.setHasFixedSize(true);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));


        userLst = new ArrayList<>();

        //Get all chats between current user and and other users
        user = FirebaseAuth.getInstance().getCurrentUser();
        reference = FirebaseDatabase.getInstance().getReference("Chats");
        reference.addValueEventListener(new ValueEventListener() {
            @Override
            public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                userLst.clear();

                for (DataSnapshot snp : dataSnapshot.getChildren()){
                    Chat chat = snp.getValue(Chat.class);
                    if (chat.getSender().equals(user.getUid())){
                        userLst.add(chat.getReceiver());
                    }
                    if (chat.getReceiver().equals(user.getUid())){
                        userLst.add(chat.getSender());
                    }
                }
                readChat();
            }

            @Override
            public void onCancelled(@NonNull DatabaseError databaseError) {

            }
        });
    }

    private void readChat() {
        inboxLst = new ArrayList<>();

        reference = FirebaseDatabase.getInstance().getReference("Users");
        reference.addValueEventListener(new ValueEventListener() {
            @Override
            public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                userLst.clear();
                for (DataSnapshot snp : dataSnapshot.getChildren()) {
                    User usr = snp.getValue(User.class);

                    //Display users that are currently in an open chat
                    for (String id : userLst){
                        if(usr.getId().equals(id)){
                            if(inboxLst.size() != 0){
                                for (User usrl : inboxLst){
                                    if(!usr.getId().equals(usrl.getId())){
                                        inboxLst.add(usr);
                                    }
                                }
                            }else{
                                inboxLst.add(usr);
                            }
                        }
                    }
                }
                //Set the adapter for the recycler view once using the chat information retrieved from firebase database
                usrAdpt = new UserAdapter(InboxActivity.this,inboxLst);
                recyclerView.setAdapter(usrAdpt);
            }
            @Override
            public void onCancelled(@NonNull DatabaseError databaseError) { }
        });
    }
}

UserAdapter.java:

public class UserAdapter extends RecyclerView.Adapter<UserAdapter.ViewHolder> {

    private Context cont;
    private List<User> nUser;

    public UserAdapter(Context cont, List<User> nUser){
        this.cont = cont;
        this.nUser = nUser;
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(cont).inflate(R.layout.lst_layout_inbox, parent, false);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
        User user = nUser.get(position);
        holder.username.setText(user.getUsername());

        holder.usrLst.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(cont, MessageActivity.class);
                intent.putExtra("userid",user.getId());
                cont.startActivity(intent);
            }
        });

    }


    @Override
    public int getItemCount() {
        return nUser.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder{
        public TextView username;
        RelativeLayout usrLst;

        public ViewHolder(View itemView){
            super(itemView);

            username = itemView.findViewById(R.id.usrName);
            usrLst = itemView.findViewById(R.id.usrCard);
        }
    }
}