i’m using two way http get data from Api, when “ionic server” on chrome its good, but “ionic run android --device” => error
- Http get angular 2:
import { Http, Response } from ‘@angular/http’;
=> error: Failed to load resource: net::ERR_NAME_NOT_RESOLVED
- HTTP native ionic 2:
import { HTTP } from ‘ionic-native’;
=> error: “The host could not be resolved”
plz help me fix it, thanks
your device has a stable internet connection?
you added and configured the cordova-whitelist-plugin. So your app is allowed to send request to those apis?
2 Likes
I don’t understand , but I’ve updated to version higher android running normally
there are security policies on mobile devices. You have to configure what servers/apis your app is allowed to communicate with. And you do it with the cordova-white-plugin.
Google it
2 Likes