0

I was receiving this error

"Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.generateWebResourceResponse"

when running a simple android application on an android device. I updated the cordova.jar file within the "libs" folder within the android project folder by downloading the new cordova-2.9.jar file, renaming it to "cordova.jar" and replacing it with the original jar file. Now when I run the app logcat shows no error or warnings but the screen is black and the last seven logcat messages are

07-15 15:07:14.226: D/CordovaWebView(24584): >>> loadUrlNow()

07-15 15:07:14.326: D/CordovaActivity(24584): onMessage(onPageStarted,file:///data/data/com.PrototypeApp/files/www/skinLoader.html)

07-15 15:07:14.366: D/webkit-timers(24584): [JWebCoreJavaBridge::resume] >> do resume

07-15 15:07:14.486: D/dalvikvm(24584): GC_CONCURRENT freed 344K, 44% free 3415K/6023K, external 0K/0K, paused 2ms+3ms

07-15 15:07:15.167: D/Cordova(24584): onPageFinished(file:///data/data/com.PrototypeApp/files/www/skinLoader.html)

07-15 15:07:15.177: D/CordovaActivity(24584): onMessage(onPageFinished,file:///data/data/com.PrototypeApp/files/www/skinLoader.html)

07-15 15:07:17.189: D/CordovaActivity(24584): onMessage(spinner,stop)

No initialization happens of the js and html files within my common and android folder. I am using android api 10 and my phone is android 2.3.4. Does anyone know why there is no initialization or how to fix my problem? Thank you

JSchif11
  • 9
  • 2
  • 1
    Protip: Don't update Apache Cordova. It's unsupported, as far as I know. New versions of Worklight ship with an updated version of Apache Cordova. – cnandreu Jul 15 '13 at 19:19

1 Answers1

0

Some background:
The error you see is in fact an Apache Cordova defect, fixed in Cordova 2.7. Worklight uses Cordova 2.6.

The defect affects a subset of devices that also happen to use Android OS v2.x; some devices will only show an error in LogCat, others may crash.

This issue will be addressed in a near-future release of Worklight 6.0.0.x.

That said,
Worklight does not support the "upgrade" method (or any method) for Cordova that you've tried to do.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I just recreated the android environment so it's using the default version of cordova. I am now getting the original error along with >07-15 15:50:40.559: E/Web Console(25187): Error: scriptError at :1169057609 >07-15 15:50:40.579: E/Web Console(25187): Error: scriptError at :1169057609 Any ideas on how to solve this besides just waiting? I understand that might be the best idea but I would like to use an actual device to test my app. In addition I am using dojo, but when these errors appear, only the basic html shows without any of the graphics from dojo, Unlike when I view on the console – JSchif11 Jul 15 '13 at 19:51
  • The two issues are unrelated. 1) use either emulator or a device that runs Android 4 until the fix is out; 2) see these questions about the Dojo issue: [here](http://stackoverflow.com/questions/17603370/ibm-worklight-6-0-scripterror-in-dojo-js21), [here](http://stackoverflow.com/questions/17546952/worklight-core-web-layer-js-errors) and [here](http://stackoverflow.com/questions/17543927/ibm-worklight-6-0-unable-to-run-sample-hybrid-worklight-app-using-dojo-toolkit). – Idan Adar Jul 16 '13 at 02:09
  • @JSchif11, if your question is answered, please mark as answered. – Idan Adar Jul 19 '13 at 15:36