Phonegap Cordova 2.0.0 Android apk Error

荒凉一梦 提交于 2019-12-14 02:14:02

问题


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


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/11775740/phonegap-cordova-2-0-0-android-apk-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!