Android Firebase Exception "could Not Resolve Type T"
hi have an abstract generic class 'ArticleOrdered' and a subclass 'DrinkOrdered' (see code below for class declaration). If i create a DrinkOrdered object and i save it in Firebase
Solution 1:
I had the same issue in my app, managed to fix it by casting the object myself:
DrinkOrdereda= (DrinkOrdered) dataSnapshot.getValue();
Solution 2:
I solved it by myself, using Jackson with these 2 lines of code:
ObjectMappermapper=newObjectMapper();
DrinkOrdereda= mapper.convertValue(dataSnapshot.getValue(), DrinkOrdered.class);
Post a Comment for "Android Firebase Exception "could Not Resolve Type T""