My app works perfectly in browser but on emulating to android emulator, error "Failed to load resource" is thrown on fetching data from json-server running in my localhost.
With data from other links, i included whitelist plugin and Included
<meta http-equiv="Content-Security-Policy">
in index.html
Please help me where i am going wrong and why the resource is not loading for emulator when it does for browser. Thanks in advance.
when the app is in the emulator, localhost no longer means your computer, it means the emulator. You probably need to setup your server location so that it points to the ip address of your computer in the local network.