I don't know what happened in this code. Anyone help me? Thanks in advance.
I am trying to parce data from one fragment to another fragment using parcelable, but my app crashed while fetching.
CodePudding user response:
It's saying that you are calling your hashcode method on a null object which is -GetShopsResponse.Data.Shop.Attachment
you should nullcheck it first like this:
GetShopsResponse.Data.Shop.Attachment?.hascode()
CodePudding user response:
I think you passed some data in next fragment (B), then you perform some operation in fragment (B), so if the data is null application was crashed. so check your next fragment (B) and maintain null check condition. if already maintained then you can share code where you fetching data in next fragment.