android - webview 加载图片非常多的页面导致 app crash
迷茫
迷茫 2017-04-18 09:26:45
0
2
488

大屏手机和最新的系统最容易出现 crash。
crash 的报告信息主要是如下:
ios 崩溃线程 WebThread ,JavaScriptCore 大量吞内存。

想问:
1、是否有方法通知前端,然后来触发内存的释放。
2、webview 是否可以设置一个内存极限值,自动释放。
3、其他任何能解决类似问题的方法。

谢谢了先

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
黄舟

1. Find the source of the problem: Are there too many ajax requests and too many picture requests when loading the interface?
2. If it is a problem of too many requests, communicate with the H5 people and see if the loading requests can be delayed or divided Segment requests, don’t let the request volume suddenly increase

PHPzhong

Webview doesn’t know how to recycle it, but the easiest way is to add
android:largeHeap="true"
android:hardwareAccelerated="true"
in the application manifests.xml to increase the memory that can be used by the app

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template