So I\'m struggling with this issue for about three hours now.
I have this user class
public class User {
private String user_id;
private String userNa
I had this same problem, turns out it was happening because the class (in your case User.class) doesnt have setter methods for the required variables
You need to iterate over dataSnapshot.getChildren(
...for example
for (DataSnapshot childSnapshot: dataSnapshot.getChildren()) {
User user = childSnapshot.getValue(User.class);
}