Activity restarts on Force Close

后端 未结 3 1884
小鲜肉
小鲜肉 2020-12-05 20:07

I have an Application with a single root Activity. I\'ve recently had it brought to my attention that any kind of Force Close on my Activity results in it restarting and I h

3条回答
  •  醉梦人生
    2020-12-05 21:11

    This may be caused by calling a system API that is not available on your target device. I ran into a similar issue then trying to call ActivityManager.MemoryInfo.totalMem on a 4.0.x device. I didn't get any compile errors as I was targeting 4.2.2 and ActivityManager.MemoryInfo.totalMem was added in API16 (4.1)

提交回复
热议问题