2016-07-23 4 views
0

私は、phonegapでビルドされたapkでgetJSONを作りたいと思います。私の関数はデスクトップ上で動作しますが、apkから実行すると関数は実行されません。私はすでに私のconfig.xmlにあなたの助けをgetgSONはphonegapビルドでは機能しません

<allow-navigation href="http://*/*" /> 
<allow-navigation href="https://*/*" /> 
<allow-navigation href="data:*" /> 
<allow-navigation href="*" /> 
<access origin="*" /> 
<allow-intent href="*" /> 

おかげで、あなたをこれを追加している

$.getJSON(url, function(data) { 
     var items = []; 
     if (data.state == 'ok'){ 
      $('#succes').html("Votre compte a été créé"); 
     } 
     else { 
      $('#succes').hide(); 
      $('#erreur').html("Une erreur est survenue !"); 
      $('#erreur').fadeIn(); 
     } 
    }); 

;)

(と私の英語レベルのため申し訳ありません:

私のjQueryの機能)

答えて

0

ホワイトリストのプラグインがありません:

<access origin="*"/> 
    <!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin --> 
    <!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html --> 
    <plugin name="cordova-plugin-whitelist" version="1" /> 
    <allow-intent href="http://*/*" /> 
    <allow-intent href="https://*/*" /> 
    <allow-intent href="tel:*" /> 
    <allow-intent href="sms:*" /> 
    <allow-intent href="mailto:*" /> 
    <allow-intent href="geo:*" /> 
関連する問題