Skip to content

Instantly share code, notes, and snippets.

@xionglun
Last active August 29, 2015 14:02
Show Gist options
  • Save xionglun/8fcdfe3f6adabf1322f0 to your computer and use it in GitHub Desktop.
Save xionglun/8fcdfe3f6adabf1322f0 to your computer and use it in GitHub Desktop.
Android WebView EventHub.removeMessages(int what = 107)

WebView Lifecycle

We ran into a problem when leaving the activity. WebView will display the following message in logcat:

EventHub.removeMessages(int what = 107) is not supported before WebViewCore is set up

To prevent this message from showing up use WebView stopLoading() method:

  // !!! This method is wrong!
  // !!! Do not solve problem
  @Override
  public void onStop() {
     try{
         webView.stopLoading();
     }catch(Exception e){
         e.printStackTrace();
     }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment