Issue
How to fix crash issue on a recycler view due to JsonSyntaxException?
com.google.gson.JsonSyntaxException: java.lang.NumberFormatException:Expected an int but was 0.5 at line 1 column 39043 path $.items[10].weight
Solution
Solution:
Step-1: Please try to crosscheck your json with your model class
Step-2: If any data type mismatch found, fix it.
Say for an example, if you define your 'weight' as an 'Int' on your model class and your json data type is 'double' then update your model class accordingly.
Step-3: Rebuild your project and run after cleanup.
Answered By - Fazle Rabbi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.