Problem:
The JavaScript to Java Bridge on2.3 Gingerbread is causing crashes. This was 100% reproducible using the Webviewdemo application from here:http://code.google.com/p/apps-for-android/source/ browse/#svn/trunk/samples/webviewdemo.note:the project file for this app is a little messed up, however, if you recreate The project, keeping the code the same, you can reproduce the error. The sample is old, but the code should still run as none of the these interfaces has been deprecated. It is also easily reproducible by creating a simple application that creates a WebView, enables JavaScript, adds a JS inte Rface, then loads a script into the webview. The code for this even simpler app was attached as well as webviewtest and a secondary Test class as the "bridge". The demos work as expected if using 2.2This is a serious issue as it would cause crashes for any app using the WebView to Do any serious work. Thanks in advance for taking a look at this. Attached is the output from Logcat as well as the output from ADB bugreport.
|
Log.txt 8.3 KB View Download |
|
Bug.txt 1.1 MB View Download |
|
Webviewtest.java 764 bytes View Download |
|
Test.java 149 bytes View Download |
Solution:There will be a problem with Android 2.3, which can be solved by changing the target version.
Reference:https://code.google.com/p/android/issues/detail?id=12987