App crashes when restoring from background after a long time

前端 未结 5 1574
执笔经年
执笔经年 2020-12-05 10:57

My application crashes after idling for a long time in the background. I debugged and found the reason that it is crashing is due to a NullPointerException. Exc

5条回答
  •  天涯浪人
    2020-12-05 11:19

    Try to avoid using static variables in your application which are causing these kind of issues. Try to save your data in Shared Preferences and use it.

提交回复
热议问题