Android App Restarts upon Crash/force close

前端 未结 7 976
名媛妹妹
名媛妹妹 2020-12-07 10:10

My android app is getting restarted after force close, through my entire application which consist of 20 activities, I am relying on static data created on a main activity.

7条回答
  •  伪装坚强ぢ
    2020-12-07 10:31

    Do not store data in static fields. Your process could be stopped on low memory event and you will lost everything. Your activities will be restored from saved state if user switch to your app again, but your static variables will not get restored.

提交回复
热议问题