0
[]firebase.database.DatabaseException:未能類型java.lang.Long中的值轉換爲字符串
我想這個數據添加到FirebaserecyclerAdapter並收到此錯誤
這裏是數據庫參考
databaseReference = FirebaseDatabase.getInstance().getReference().child("questions");
這是如何我已經使用了RecyclerViewAdapter
FirebaseRecyclerAdapter<History, HistoryViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<History, HistoryViewHolder>(
History.class, R.layout.history_list_item, HistoryViewHolder.class, databaseReference) {
@Override
protected void populateViewHolder(HistoryViewHolder viewHolder, History model, int position) {
viewHolder.setMyanswer(model.getMyAnswer());
viewHolder.setCorrentAnswer(model.getCorrectAnswer());
viewHolder.setImageUrl(getApplicationContext(), model.getImageUrl());
}
};
recyclerView.setAdapter(firebaseRecyclerAdapter);
謝謝你。愚蠢的錯誤我的壞。 –
你是number1 – mehmet