我正在使用 xhtml 1.0 transitional 和 javascript 在 android 中做一个 phonegap 应用程序。该应用程序与 phonegap 1.5 版一起正常工作,但是当我将版本更改为 1.9 时,它显示以下错误
错误
找不到课程'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.generateWebResourceResponse
,我在谷歌中搜索了这个但没有找到解决方案。
当我尝试通过将 phonegap 1.5 jar 替换为 phonegap 1.9 jar 文件而不替换 js 文件来执行相同的应用程序时,该应用程序可以工作,但是当我将 js 和 jar 文件都替换为 phonegap 1.9 时,它会显示上述错误。
错误:
07-04 11:57:05.339: E/AndroidRuntime(1296): Uncaught handler: thread main exiting due to uncaught exception
07-04 11:57:05.349: E/AndroidRuntime(1296): java.lang.SecurityException: ConnectivityService: Neither user 10038 nor current process has android.permission.ACCESS_NETWORK_STATE.
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.os.Parcel.readException(Parcel.java:1218)
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.os.Parcel.readException(Parcel.java:1206)
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.net.IConnectivityManager$Stub$Proxy.getActiveNetworkInfo(IConnectivityManager.java:239)
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.net.ConnectivityManager.getActiveNetworkInfo(ConnectivityManager.java:195)
07-04 11:57:05.349: E/AndroidRuntime(1296): at org.apache.cordova.NetworkManager.execute(NetworkManager.java:124)
07-04 11:57:05.349: E/AndroidRuntime(1296): at org.apache.cordova.api.PluginManager.exec(PluginManager.java:211)
07-04 11:57:05.349: E/AndroidRuntime(1296): at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:207)
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:539)
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.os.Handler.dispatchMessage(Handler.java:99)
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.os.Looper.loop(Looper.java:123)
07-04 11:57:05.349: E/AndroidRuntime(1296): at android.app.ActivityThread.main(ActivityThread.java:4363)
07-04 11:57:05.349: E/AndroidRuntime(1296): at java.lang.reflect.Method.invokeNative(Native Method)
07-04 11:57:05.349: E/AndroidRuntime(1296): at java.lang.reflect.Method.invoke(Method.java:521)
07-04 11:57:05.349: E/AndroidRuntime(1296): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-04 11:57:05.349: E/AndroidRuntime(1296): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-04 11:57:05.349: E/AndroidRuntime(1296): at dalvik.system.NativeStart.main(Native Method)...