Android WebView内存不足分配

时间:2014-01-27 17:50:34

标签: android memory webview out

我有一个显示来自uri的位图的WebView。它在加载的前7或8次运行良好,但是当加载它时我得到这个错误。需要帮助。

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

2 个答案:

答案 0 :(得分:1)

您是否考虑过在WebView上实现onLowMemory()并使用freeMemory?您也可以使用clearCache。另一个考虑因素是改变缓存模式。

答案 1 :(得分:1)