低的android内存:没有更多的后台进程?需要帮忙 [英] android Low memory:no more background process ?? Need help

查看:121
本文介绍了低的android内存:没有更多的后台进程?需要帮忙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我面临内存不足的问题。 内存不足:没有更多的后台进程这是该方案

I am facing the problem of low memory. Low memory:no more background process And here is the scenario.

我使用从字符串数组中获取其数据的列表,它具有自定义背景,点击项目列表中得到另一个字符串数组显示为第二或第三的水平。信息写入数据库三个级别。

I am using a list which gets its data from a string array, it has a custom background, Clicking on item, the list gets another string array to display as second or third level. Information for three levels written in database.

在第三个层次,有两个层面的数据将被从Web服务获取,

After third level, there are two more levels for which data is going to be fetched from web services,

这会导致内存不足错误。

And that causes the low memory error.

<打击>我怎样才能摆脱的解决方案?

修改 有一些挖我发现,GC试图(杀死或)重启的情况下,其已经坠毁 COM之后。 android.inputmethod.latin / .latinIME 服务。一个值得注意的一点是,该应用程序翻译成法语和意大利语,但此屏幕没有任何文本进行翻译,这是否信息帮助??

Edit : After having some digging I found that the GC is trying to (kill or) restart in case of its already crashed com.android.inputmethod.latin/.latinIMEservice. One notable point is that the application is translated in french and italian, but this screen does not have any text for translation, does this information helps??

编辑2: traceview我发现,所有的文本视图在其应用的自定义字体的详细研究之后。 (有TypeFace.createFromAsset()的调用),国际海事组织导致崩溃。

Edit 2: After a detailed study of traceview I found that all the text views have custom fonts applied in it. (There is a call of TypeFace.createFromAsset()) that IMO causes the crashes.

和问题在于,我必须保持字体.... <打击>可以说,它是可能避免碰撞,并有字体?? (因为我认为答案是否定的:但还在等待一些意见)

And the problem lies in the fact that I have to keep the fonts.... can It be possible to avoid crash and have the fonts?? (Because i think the answer is no: But still waiting for some opinions)

修改3 :删除自定义字体后,应用程序的性能要好得多。因此,我可以怀疑的字体是这里唯一的罪魁祸首。这就是为什么我编辑的问题。我使用的字体是黑体。

Edit 3 : After removing the custom fonts the performance of application is much better. Hence I can suspect the font is the only culprit here. And that's why I am editing question. The font I use is helvetica.

可以使用外部字体导致应用程序崩溃或运行内存?如果是的话你能描述的原因更详细??

Can using external fonts cause application to crash or running out of memory? If yes can you describe the cause in more detail??

感谢

推荐答案

如果您使用的是code类似于:

If you are using code similar to:

Typeface font = Typeface.createFromAsset(getContext().getAssets(),
"fonts/Helvetica.ttf");

尝试使字体,因此只被加载一次一个全局变量。否则,它可以反复加载,迅速消耗内存。 对于更多的细节,请参阅该消息

这篇关于低的android内存:没有更多的后台进程?需要帮忙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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