Viewpager Webview memory issue

后端 未结 3 1802
北荒
北荒 2020-12-15 11:37

I\'m using a viewpager to load around 50 webviews... All the webviews are loaded into assests and each weview has an HTML page that is accessing around 70 images each... As

3条回答
  •  不思量自难忘°
    2020-12-15 12:19

    The WebView works with the JNI and this can only hold 512 local references, try loading your content directly from web and the problem shouldn't occur.

    I get this problem when I override shouldInterceptRequest(WebView view, String url) in webviewclient and hand local references from my own caching mechanism.

    This might be a bug in the webview itself. At least it isn't how it should behave if you ask me.

提交回复
热议问题