Skip to content Skip to sidebar Skip to footer

WebView In NestedScrollView Gives Fatal Signal 6 (SIGABRT) Code -6 RenderThread

I have an activity with a ViewPager and TabLayout as below: Copy

I removed this line of code, and my app stoped crashing. I faced with this issue on Android N. BTW Hardware acceleration is enabled by default if your Target API level is >=14 and i think this line of code is redundant.


Solution 2:

Well, I found a way to get the behaviour I want. But not to fix the original problem.

I found this StackOverflow post which suggested extending WebView and implementing NestedScrollingChild as has been done here (Apache2).

This works perfectly. However, it is not a solution to the actual problem.

The layout now reads

<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>

The only change being adding the layout_behavior.


Solution 3:

i has same issue and then i added code delayed handler

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 
}

Post a Comment for "WebView In NestedScrollView Gives Fatal Signal 6 (SIGABRT) Code -6 RenderThread"