Since 2014, Android WebView has paved the way as an updatable system component, providing Stability and performance improvements, modern web platform features, and security patches for Android applications and users. However, updates can be a double-edged sword: just as we strive for stability and downward compatibility, new crashes and ground-breaking changes occasionally pop up. To address these issues more quickly, today we are releasing WebView DevTools, a new set of on-device debugging tools for diagnosing WebView-induced crashes and malfunctioning Web platform features.

For your convenience, the WebView development tool is included as part of the WebView itself. The easiest way to start WebView Devtools is to try WebView Beta. The beta is a way for application developers to get WebView a few weeks before it reaches users, giving them extra lead time to report compatibility defects to our team. Starting with today’s version (M83), WebView Beta includes the WebView DevTools startup icon. Just find the blue and gray WebView gear icon to start debugging the WebView in your application.

No software is bug-free, and loading Web content is a challenge, so WebView crashes are no surprise to applications. Worse, these crashes are difficult to debug because the WebView’s Java and C++ stack trace is fuzzy (to minimize the APK size for Android users). To make these crashes more manageable, we provide first-class access to WebView’s built-in crash reporters. Just open WebView DevTools and click “Crash” to see a list of recent WebView crashes caused by applications on your device. You can use this tool to see if the crash report has been uploaded to our server, force it to be uploaded if necessary, and then submit a bug. This ensures that our team has all the information it needs to quickly resolve these failures and ensure a smoother user experience in your application.

However, not all bugs cause crashes. Some versions of WebView in the past have broken Android applications due to behavior changes caused by new features. Although our team’s policy is to roll back features that break compatibility, the Chromium team has several features enabled for WebView in each release, and it often takes time to identify problematic features. Help is also available here. We offer a similar experimental feature control for application developers, inspired by Google Chrome’s Chrome:// Flags tool, which allows Google compatibility tests to have web platform functionality. First, open WebView DevTools, click “Flags” to enable or disable any available features, and then close and restart the WebView-based application you are testing. Using WebViewDevTools helps us identify the culprit together so we can roll it back. We also provide feature flags for upcoming releases, so you can test compatibility earlier by enabling these features on test devices.

We hope you find WebView development tools helpful for reporting crashes and testing new WebView features. Install WebView beta today, get started with the WebView development tool, and check out the user guide for more tips and tricks.

The original author: Nate Fischer WebView team software engineer The original address: android-developers.googleblog.com/2020/04/dev…

199 yuan Study Package:Click to receive

Original address:Androidweekly. IO/news – develo…

Copyright notice: All forms of reprint – no commercial – no derivative

The public no. :Android Development Technology Weekly