【发布时间】:2016-10-19 22:28:42
【问题描述】:
我有一个用于显示来自 JSON 网络服务的新闻的 cordova android 应用程序 当我创建 .apk 文件时,ajax 请求在网络浏览器上工作,但在 android 上不工作 应用链接https://github.com/Adib12/technologia
我的配置文件
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Technologia</name>
<description>
Suivre les actualités des nouvelles technologies
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Aouadi Adib ( AdibDev )
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
</widget>
我需要帮助
【问题讨论】:
-
Cordova 白名单插件添加了吗?你能发布你的 config.XML 吗?
-
我添加了你现在可以看到的配置文件
-
XML 文件看起来不错。发出ajax请求时有任何错误跟踪吗?您是否尝试过使用设备检查器进行调试
-
不,我的电脑上没有android SDK,你可以克隆它并修复它吗
-
会回复这个
标签: android jquery json cordova jquery-mobile