Similar Problem : JavaScript doesn't work on ICS
I'm working on an Android app that displays some code samples to the user. So, I'm using google-code-prettify in a WebView for syntax highlighting. But, the problem is, the js does not work on ICS (Ice Cream Sandwich) alone. It works perfectly on all other Android versions (2.2+) except 4.0.x. This is the code that I'm using.
WebView webView = (WebView) findViewById(R.id.webViewSample);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("file:///android_asset/code_snippets/sample_java.html");
The only error-like message that I get from logcat is UNKNOWN CHROMIUM ERROR: -6
Any help would be great. Thanks in advance.
Didn't find any proper solution.. So, I ended up following MoshErsan's suggestion as mentioned here:
This is what I did:
Don't know what the actual problem is. But, this hack works.