-2

After migrating to Worklight v6.0 I get this error on old Android 2.2 device:

E/dalvikvm(xxx): Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.getWhitelistResponse

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
ylCmg
  • 13
  • 3

1 Answers1

0

Is this crashing your application or just being printed to the LogCat?

This is fixed in Cordova 2.7.
Worklight 6.0 currently uses Cordova 2.6.

For more information: https://issues.apache.org/jira/browse/CB-3504

In CordovaWebViewClient.java, android.webkit.WebResourceResponse is imported and used by the methods shouldInterceptRequest and getWhitelistResponse. But since android.webkit.WebResourceResponse is only available on devices >= API Level 11, this causes cordova apps to crash on devices at a lower API Level like my Samsung Galaxy S.

Some more from Stackoverflow:

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • migrating from WL 5.0.6 dojo app, tested on emuluator and device both api 8. – ylCmg Jun 30 '13 at 13:43
  • In fact I saw the solutions before, But I am developing a simple application using worklight, I do not make use of apache cordova – ylCmg Jun 30 '13 at 14:29
  • Cordova is in the core of the project even if you're not making use of it. Worklight does. – Idan Adar Jun 30 '13 at 14:30
  • @user2536334, can you upload to somewhere your Worklight project that is crashing when installed on a device? Are you an IBMer? – Idan Adar Jul 01 '13 at 06:40