When Chrome is disabled on Android O, activity including webview drops

Asked 2 years ago, Updated 2 years ago, 40 views

This is a situation where activity including webview drops when Chrome is disabled.
I'm in trouble because there's no way to improve it.

The application will be terminated in step 2 above.
This is not happening on Android 6.0/7.0 and is happening on Android O (API level 26/8.0.0)
Anything else unknown

The affected codes are as follows

public class TestWebActivity extensions Activity {
    @ Override
    protected void onCreate (Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_testweb);
        WebView webView= (WebView) findViewById (R.id.webView);
        webView.setWebViewClient(newMyWebViewClient());
    }

    class MyWebViewClient extensions WebViewClient {
        @ Override
        public boolean shouldOverrideUrlLoading (WebView view, String url) {
            return true;
        }
    }
}

The error log is as follows:

12-28 16:41:42.146 31047-31047/xxxxxxxE/AndroidRuntime:FATAL EXCEPTION:main
Process: xxxxxxxxx, PID:31047
java.lang.RuntimeException:Unable to start activity ComponentInfo {xxxxxxx/xxxxxxxxx.TestWebActivity}:android.view.InflateException:Binary XML file line#33:Binary XML file line#33:Error inflating class android.webkit. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11 (Unknown Source:0)

Error inflating class android.webkit.WebView has a bug on Android 5, but I couldn't find any events on Android O.

I would appreciate it if you could let me know if anyone knows anything.

android

2022-09-30 11:43

1 Answers

The corresponding model was updated from Android 8 から to 8.0.0, but it seems to have happened.
There are two models in the same condition, one of which was updated to 8.1 and this did not happen.
The other one remained at 8.0.0 and resetting the terminal stopped the same thing.

It is speculation from here, but when I updated from Android 8 から to 8.0.0, I suspect that there were packages such as chrome that were used in >.


2022-09-30 11:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.