白名单不工作离子与人行横道 [英] whitelist not working ionic with crosswalk

查看:203
本文介绍了白名单不工作离子与人行横道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用离子成立了工作程序。有从我的网站获取数据没有问题,一切都很好。

I created a working app using ionic. there was no problem with fetching data from my site and everything was good.

然后我去添加人行横道它,现在我得到的错误,当我在我的Andr​​oid手机上运行它:

I then went to add crosswalk to it and now i get the error when i run it on my android phone:

W/XWalkCordovaResourceClient():URL blocked by whitelist: http://example.com/api/

在顶层config.xml中我已经尝试每个以下(不是所有3一次),并具有相同的结果重新运行它(离子运行Android):

In the top level config.xml i have tried each of the following (not all 3 at once) and reran it (ionic run android) with the same results:

  <access origin="*"/>
  <access origin="http://www.example.com/*"/>
  <access origin="http://www.example.com"/>

我是什么做错了吗?

What am I doing wrong?

运行离子信息'我得到:

running 'ionic info' i get:

OS: Max OS Yosemite
Nodoe Version: v0.10.36
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.19
Xcode version: Xcode 6.2 Build Version 6C121e
ios-sim version: 3.1.1.

作为一个独立的,但可能相关的问题,安装人行横道上运行的Andr​​oid模拟器的应用程序后,已停止工作也 - 建立成功后,它只是说该应用程序已停止

As a separate but possible related question, after installing crosswalk running the app on an android emulator has stopped working also - after building successfully it just says 'the app has stopped'

推荐答案

我想它了!问题是,在最新的科尔多瓦,他们已经打出了白名单功能整合到自己的插件。

I figured it out! The problem is that in the latest Cordova, they've split out the whitelist functionality into its own plugin.

只需运行离子插件添加https://github.com/apache/cordova-plugin-whitelist.git ,你是好!

这篇关于白名单不工作离子与人行横道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆