AJAX request to server respond error with status 0

i am trying to access my server using below code:

dataType: ‘json’,
contentType: “application/json”,
crossDomain: true,


it respond successfully on browser testing but when i build and install to android device, it throws error with status:0.
I have also set config.xml setting to access origin to *.

What am I doing wrong? Please help me…

maybe you need to add additionally the cordova whitelist plugin?

thanks! you have saved my life.

Hello friends , i am also getting same error that readystate 0 , while doing ajax request , i have updated the whitelist plugin to latest . but my issue haven’t resolved .
also i have all config in config.xml

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