I build a very simple Sencha-Touch-2 app and deployed it to Eclipse. The app work on Chrome, but on the device I'm getting the following error:

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

I tried to google it but didn't found solution for me. My App is at android 2.3.1 level and my device is 4.1.1 and it doesn't work on both of them.

Thanks

有帮助吗?

解决方案

Do you have 'cordova-1.9.0.jar' in your '/libs' folder ?
Make sure this is in /libs folder if you are using ADT 17 or above version.

其他提示

I think it could be related with the new name of the lib folder (previously 'lib' now is 'libs'). Try to rename it an check if it works.

Extracted from this answer in SO


EDIT: Other possibility is that ProGuard is messing with the library to fix it you can try this:

-keep public class * extends com.phonegap.api.Plugin 
-keep public class org.apache.cordova.DroidGap 
-keep public class org.apache.cordova.** 
-libraryjars /Users/Nasir/Desktop/libs/commons-codec.jar
-dontwarn android.webkit.*

Extracted from this answer in SO

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top