Class java.util.Map has generic type parameters, please use GenericTypeIndicator instead

后端 未结 6 1247
既然无缘
既然无缘 2020-11-29 09:11

I am using firebase to retrieve data from database n use

Map map = dataSnapshot.getValue(Map.class);

to get values, but it

6条回答
  •  失恋的感觉
    2020-11-29 09:50

    Chage

    Map map = (Map)dataSnapshot.getValue(Map.class);
    

    by this

    Map map = (Map) dataSnapshot.getValue(Map.class);
    

提交回复
热议问题