Android WebView的内存不足分配 [英] Android WebView Out of memory allocation

查看:825
本文介绍了Android WebView的内存不足分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WebView,其中显示了uri的位图.它在加载的前7或8次中工作良好,但是在加载时出现此错误.请需要帮助.

I have a WebView that shows a bitmap from uri. It works well the first 7 or 8 times it is loaded but then when loading it i get this error. Need help please.

01-27 18:44:27.155  30480-30480/? E/dalvikvm-heap﹕ Out of memory on a 631816-byte allocation.
01-27 18:44:30.579  15859-15859/? E/MtpService﹕ In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
01-27 18:44:30.579  15859-15859/? E/MtpService﹕ battPlugged Type : 2
01-27 18:44:34.362    1704-8058/? E/Dumper﹕ 3: 48387128549: User action: dump logging  circular buffer and context
01-27 18:44:34.362    1705-2000/? E/Dumper﹕ 3: 48387128549: User action: dump logging circular buffer and context
01-27 18:44:34.362    1704-8058/? E/Dumper﹕ 4: 48387128579: Triggering circular buffer dump in /data/ste-debug
01-27 18:44:34.362    1705-2000/? E/Dumper﹕ 4: 48387128579: Triggering circular buffer dump in /data/ste-debug
01-27 18:44:35.023  30960-30971/? E/SQLiteLog﹕ (1) duplicate column name: EVENT_TYPE
01-27 18:44:35.123    2296-2296/? E/Launcher﹕ Error finding setting, default accessibility to not found: accessibility_enabled

推荐答案

您是否正在回收位图?您可以缩小图像的大小吗?

Are you recycling your bitmaps? Could you reduce the size of the images?

请查看以下链接:

将图像加载到位图对象时出现内存不足问题

WebView中的大图像导致内存不足

网络视图捕获会导致内存不足异常

这篇关于Android WebView的内存不足分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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