Cordova Config中的errorUrl在Android上不起作用

托斯滕·西蒙

文档中所述在config.xml中设置errorUrl时,我会收到一条错误消息

CordovaWebViewImpl: showWebPage: Refusing to load URL into webview since it is not in the <allow-navigation> whitelist. URL=error.html

我会看到默认的android错误页面。

托斯滕·西蒙

对我来说,将网址更改为

<preference name="ErrorUrl" value="file:///android_asset/www/error.html" />

工作了。您应该在android平台部分添加此值,因为这是android特定的。

另外请确保不要设置

 <allow-intent href="*" />

否则,您会看到一条错误消息,告诉您未找到任何可处理意图的活动

ActivityNotFoundException: No Activity found to handle Intent

如果需要允许使用网页,请考虑添加

<allow-intent href="http://*/*" /> <allow-intent href="https://*/*" />

代替。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Cordova会话Cookie在Android Lollipop上不起作用

Cordova fileupload在Android上不起作用,$ _ FILES为空

Cordova InAppBrowser EventListener在iOS上不起作用

Cordova / Phonegap:AJAX呼叫在iOS设备上不起作用

cordova / ionic CallNumberPlugin在电话上不起作用

ngx-translate在iOS设备上不起作用(Cordova)

history.back在使用Cordova的iOS上不起作用

cordova平台添加android-在Mac OS上不起作用

Cordova-window.history.back()在iOS 9中的HTML后退按钮上不起作用

在PhoneGap / Cordova中安排本地通知在iOS模拟器上不起作用

Cordova Async XMLHttpRequest()。open在Android中不起作用

replaceAll在Cordova中不起作用

Cordova InAppBrowser 在 iOS 中不起作用

[email protected]和Android Studio中的gradle配置不起作用

Cordova Android 版本构建 Ajax 不起作用

使用Cordova应用程序上传文件在远程服务器上不起作用

Cordova Katzer插件背景模式在iOS-9上不起作用

Phonegap cordova.plugins.barcodeScanner.scan 在 ipad 上不起作用

移动服务标签似乎在Cordova应用程序上不起作用

Cordova startWith Methode在旧手机上不起作用

ng-cordova createFile()方法(在文件API中)在android设备中不起作用

cordova cordova-plugin-statusbar StatusBarOverlaysWebView不起作用

Angular 资源在 Cordova 应用程序中不起作用

cordova-plugin-camera在IOS中不起作用

Phonegap / Cordova在iOS8中不起作用

Cordova InAppBrowser在Windows 8中不起作用

Phonegap:InAppBrowser v0.5.4插件在Android中不起作用(Cordova v3.6.4)

地理位置在Cordova Android仿真器中不起作用

FCM 推送通知在 android 中不起作用(使用 cordova-plugin-fcm 2.1.1 的 Ionic 项目)