What to do on TransactionTooLargeException

前端 未结 30 3763
盖世英雄少女心
盖世英雄少女心 2020-11-22 03:08

I got a TransactionTooLargeException. Not reproducible. In the docs it says

The Binder transaction failed because it was too large.

D

30条回答
  •  无人共我
    2020-11-22 03:38

    When I am dealing with the WebView in my app it happens. I think it's related to addView and UI resources. In my app I add some code in WebViewActivity like this below then it runs ok:

    @Override
    protected void onDestroy() {
        if (mWebView != null) {
            ((ViewGroup) mWebView.getParent()).removeView(mWebView);  
            mWebView.removeAllViews();  
            mWebView.destroy();
        }
        super.onDestroy();
    }
    

提交回复
热议问题