Android: CalledFromWrongThreadException from WebView's shouldOverrideUrlLoading
问题 I am developing on a library that is somehow getting a CalledFromWrongThread Exception crash on Samsung Galaxy S1 (api v7 - android 2.1). The code is something like this: class MyWebViewClient extends WebViewClient { @Override public void shouldOverrideUrlLoading(WebView view, String url) { someListener.addToUiView(); } } and of course, the method that is actually throwing the error (which implements a listener callback): View v; public void addToUiView(){ v.addView(new TextView(context)); //