Android的:如何处理强制关闭 [英] android: how to handle force close

查看:136
本文介绍了Android的:如何处理强制关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序,当内存不足时,部队密切弹出发生。我想要的是来处理我的应用程序,强制关闭弹出。我怎样才能做到这一点?

In my application when the memory is low, the force close popup occurs. What I want is to handle that force close pop up in my application. How can I do this?

推荐答案

您不能控制自己的应用程序这个弹出。这是由Android操作系统的控制。这是更好地分析是什么原因造成您的FC。

You cannot control this popup from your own application. This is controlled by the Android OS. It is better to analyze what is causing your FCs.

如果你的错误是由内存引起的问题,您可以尝试在活动实施onLowMemory功能。这是一个回调函数,一旦系统检测到它需要更多的内存将被调用。

If your error is caused by memory issues, you could try implementing the onLowMemory-function in your Activity. This is a callback function that will be called once the system detects it needs more memory.

这篇关于Android的:如何处理强制关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆