Phonegap构建白名单是行不通的

时间:2016-02-03 23:25:51

标签: android cordova mobile

我一直试图让我的应用程序在Phonegap Build上工作好几天了。它在终端上使用iOS模拟器工作得很好,但是当我在Android上测试它时,AJAX请求将无法正常工作。根本行不通。我尝试了许多方法,但似乎没有任何工作。这是我的config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.areatecnica" version="1.0.9" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>xxx</name>
    <description>
xxx    </description>
    <author email="xx" href="xxx">
xxx
    </author>
    <content src="index.html" />
    <preference name="phonegap-version" value="cli-5.1.1" />
  <preference name="KeyboardDisplayRequiresUserAction" value="true"/>
  <preference name="MediaPlaybackRequiresUserAction" value="false"/>
  <preference name="AllowInlineMediaPlayback" value="true"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="3000"/>
  <preference name="android-minSdkVersion" value="14" />
  <preference name="android-build-tool" value="gradle" />
    <gap:plugin name="org.apache.cordova.battery-status" />
    <gap:plugin name="org.apache.cordova.camera" />
    <gap:plugin name="org.apache.cordova.media-capture" />
    <gap:plugin name="org.apache.cordova.console" />
    <gap:plugin name="org.apache.cordova.contacts" />
    <gap:plugin name="org.apache.cordova.device" />
    <gap:plugin name="org.apache.cordova.device-motion" />
    <gap:plugin name="org.apache.cordova.device-orientation" />
    <gap:plugin name="org.apache.cordova.dialogs" />
    <gap:plugin name="org.apache.cordova.file" />
    <gap:plugin name="org.apache.cordova.file-transfer" />
    <gap:plugin name="org.apache.cordova.geolocation" />
    <gap:plugin name="org.apache.cordova.globalization" />
    <gap:plugin name="org.apache.cordova.inappbrowser" />
    <gap:plugin name="org.apache.cordova.media" />
    <gap:plugin name="org.apache.cordova.network-information" />
    <gap:plugin name="org.apache.cordova.splashscreen" />
    <gap:plugin name="org.apache.cordova.vibration" />
    <gap:plugin name="pushwoosh-pgb-plugin" source="npm" />
    <gap:plugin name="cordova-plugin-whitelist" source="npm" />

    <icon src="images/icons/icon.png" />
    <icon src="images/icons/icon-57.png" gap:platform="ios" width="57" height="57" />
    <icon src="images/icons/icon-72.png" gap:platform="ios" width="72" height="72" />
    <icon src="images/icons/icon-114.png" gap:platform="ios" width="114" height="114" />
    <icon src="images/icons/icon-144.png" gap:platform="ios" width="144" height="144" />
    <icon src="images/icons/icon.png" gap:platform="android" gap:density="ldpi" />
    <icon src="images/icons/icon.png" gap:platform="android" gap:density="mdpi" />
    <icon src="images/icons/icon.png" gap:platform="android" gap:density="hdpi" />
    <icon src="images/icons/icon.png" gap:platform="android" gap:density="xhdpi" />
    <icon src="images/icons/icon.png" gap:platform="android" gap:density="xxhdpi" />
    <icon src="images/icons/icon.png" gap:platform="android" gap:density="xxxhdpi" />


<allow-navigation href="*" /> 
<allow-intent href="*" /> 
<access origin="*" /> 

</widget>

0 个答案:

没有答案