I am using firebase to retrieve data from database n use
Map map = dataSnapshot.getValue(Map.class);
to get values, but it
I had the same problem and solved it by handling the Object instead trying to have Firebase cast it.
Map map = (Map)dataSnapshot.getValue();
did it for me.