有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java无法解析:E/RecyclerView:未连接适配器;正在跳过布局,并且无法为子()中的参数“pathString”传递null

private void customermenu() {

    swipeRefreshLayout.setRefreshing(true);
    databaseReference = FirebaseDatabase.getInstance().getReference("FoodSupplyDetails").child(State).child(City).child(Sub);
    databaseReference.addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
            updateDishModelList.clear();
            for (DataSnapshot snapshot : dataSnapshot   .getChildren()) {
                for (DataSnapshot snapshot1 : snapshot.getChildren()) {
                    UpdateDishModel updateDishModel = snapshot1.getValue(UpdateDishModel.class);
                    updateDishModelList.add(updateDishModel);
                }
            }
            adapter = new CustomerHomeAdapter(getContext(), updateDishModelList);
            recyclerView.setAdapter(adapter);
            swipeRefreshLayout.setRefreshing(false);

        }

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

            swipeRefreshLayout.setRefreshing(false);
        }
    });
    searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
        @Override
        public boolean onQueryTextSubmit(String query) {
            return false;
        }

        @Override
        public boolean onQueryTextChange(String newText) {
            search(newText);
            return true;
        }
    });

}

无法解析:E/RecyclerView:未连接适配器;正在跳过布局,并且无法为child()中的参数“pathString”传递null


共 (0) 个答案