hope someone can help.
I am developing a telephone application.
The problem is that when I launch the application using the desktop browser or even a mobile application for mobile phones, the request is fine, but when I create the phonegap build android locally using CLI v5.4.1, the phonegap build android outputs to projectroot / platform / android / build /output/apk/android-debug.apk, I get the error message "readystate 0 responsetext status 0 statustext error"
this is my code
$.ajax({ type: 'GET', url: "http://www.domain.com/gateway.php?structure", timeout: 5000, success: function(result) { var res = JSON.parse(result); res.forEach(function(element, index) { System.structure[element.company.id] = element; }); }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert('error: ' + JSON.stringify(XMLHttpRequest)); } })
and this is my config.xml
<plugin name="cordova-plugin-inappbrowser" source="npm"/> <plugin name="phonegap-plugin-push" source="npm" /> <icon src="icon.png"/> <access origin="*"/> <plugin name="cordova-plugin-whitelist" version="1" /> <allow-intent href="http://*/*"/> <allow-intent href="https://*/*"/>
I think this is very strange, and after searching for all such questions, I did not receive an answer.
What am I doing wrong?
jquery android ajax cordova config
Alex Mbaka
source share