Skip to content

Instantly share code, notes, and snippets.

@niharika2810
Last active May 30, 2020 20:25
Show Gist options
  • Save niharika2810/6c197db63a79de7d7c0ff0702ea25c63 to your computer and use it in GitHub Desktop.
Save niharika2810/6c197db63a79de7d7c0ff0702ea25c63 to your computer and use it in GitHub Desktop.
try {
// the inflating code that's causing the crash
} catch (Exception e) {
if (e.getMessage() != null && e.getMessage().contains("webview")) {
// If the system failed to inflate this view because of the WebView (which could
// be one of several types of exceptions), it likely means that the system WebView
// is either not present (unlikely) OR in the process of being updated (also unlikely).
// It's unlikely but we have been receiving a lot of crashes.
// In this case, show the user a message and finish the activity
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment