Android NestedScrollView中的WebView提供致命信号6(SIGABRT)代码-6 RenderThread

Android NestedScrollView中的WebView提供致命信号6(SIGABRT)代码-6 RenderThread,android,android-fragments,webview,sigabrt,Android,Android Fragments,Webview,Sigabrt,我有一个带有ViewPager和TableLayout的活动,如下所示: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:l

我有一个带有ViewPager和TableLayout的活动,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/item_appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.v7.widget.Toolbar
            android:id="@+id/item_toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:minHeight="0dp"
            app:layout_scrollFlags="scroll|enterAlwaysCollapsed">

        </android.support.v7.widget.Toolbar>

        <android.support.design.widget.TabLayout
            android:id="@+id/item_tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

        </android.support.design.widget.TabLayout>

    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/item_viewpager"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

    </android.support.v4.view.ViewPager>

</android.support.design.widget.CoordinatorLayout>
loadUrl是WebView开始加载的时间

我读过关于致命信号6代码-6的帖子,但没有一篇提供解决方案

非常感谢您的帮助

编辑-我删除了WebView的默认不可见性,代码对其进行了更改,并获得了更详细的更大跟踪


我不能在这里发布,因为帖子的结尾是59000个字符,但是现在它在PasteBin上了,我找到了一种方法来获得我想要的行为。但不是为了解决最初的问题

我找到了StackOverflow帖子,它建议扩展WebView并实现NestedScrollingChild

这很好用。然而,这并不能解决实际问题

现在的布局是

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:id="@+id/browser_root"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">

    <ProgressBar
        android:id="@+id/browser_loading_spinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:indeterminateTintMode="src_atop"
        android:indeterminateTint="@color/colorAccent"
        android:layout_gravity="center"/>


        <com.tpb.hn.story.NestedWebView
            android:id="@+id/browser_webview"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="invisible">

        </com.tpb.hn.story.NestedWebView>



</LinearLayout>


唯一的变化是添加布局行为。

我也遇到了类似的问题。在我的例子中,问题在于此代码:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
我删除了这行代码,我的应用程序停止崩溃。我在安卓N上遇到了这个问题。 顺便说一句,如果您的目标API级别>=14,那么默认情况下会启用硬件加速,我认为这行代码是多余的。

我也有同样的问题 然后我添加了代码延迟处理程序

private void loadJavaScript(String script) {
    mHandler.postDelayed(new Runnable() {
        @Override
        public void run() {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                if (mWebView != null) {
                    mWebView.evaluateJavascript(script, null);
                    return;
                }
            }

            loadPage("javascript:" + script);
        }
    }, 500); //this 
}

彼此彼此。它只引起了一个测试设备,现在不见了!
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
private void loadJavaScript(String script) {
    mHandler.postDelayed(new Runnable() {
        @Override
        public void run() {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                if (mWebView != null) {
                    mWebView.evaluateJavascript(script, null);
                    return;
                }
            }

            loadPage("javascript:" + script);
        }
    }, 500); //this 
}