Skip to content
Advertisement

get int data from firestore

enter image description hereim trying to get int data from firestore but before that app crashes i dont know why when i try it as string it work i get it and i can list it but when i try it int app crashes even before get data here is my code second part is my adapter logchat said 2 line is wrong i mark it with stairs for u

JavaScript

Advertisement

Answer

The problem is in the adapter then.

You have a private ArrayList<Integer> pointlistforadapter; and the problem is that you are doing holder.userpointtext.setText(pointlistforadapter.get(position)); and setText() accepts a CharSeq and it lets you add an Int in paramter because it also has this signature :

enter image description here

And since it’s not a resid it crashes.

What you can do is :

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement