com.google.firebase.database.DatabaseException:无法将 java.lang.String 类型的对象转换为类型...
还有一个错误没有连接适配器;跳过布局 - 但似乎不是严重错误 ///// 请帮助,我是编程新手,这个项目对我来说非常重要。/////
我的消息活动
public class MessageActivity extends AppCompatActivity {
CircleImageView ivProfileImage;
TextView tvUsername;
ImageButton btnSend;
EditText text_send;
MessageAdapter messageAdapter;
List<Chat> mChat;
FirebaseUser firebaseUser;
DatabaseReference databaseReference;
RecyclerView recycler_view;
Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_message);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setTitle("");
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
recycler_view = findViewById(R.id.recycler_view);
recycler_view.setHasFixedSize(true);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getApplicationContext());
linearLayoutManager.setStackFromEnd(true);
recycler_view.setLayoutManager(linearLayoutManager);
ivProfileImage = findViewById(R.id.ivProfileImage);
tvUsername = findViewById(R.id.tvUsername);
btnSend = findViewById(R.id.btnSend);
text_send = findViewById(R.id.text_send);
intent = getIntent();
final String userid = intent.getStringExtra("userid");
firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
});
慕哥9229398
潇湘沐
相关分类