This problem appeared when I update the ionic and cordova, $http can't normally work any more, always return null. in debug line apeared "04-28 16:06:29.756: W/SystemWebViewClient(16778): URL blocked by whitelist:"
相关问题
- Should I use CSS3 media queries to deliver differe
- apk big size with ionic 4 build
- How to read file in android using PhoneGap Javascr
- Ionic start give error: There was an error with th
- InAppBrowser Allow-Navigation ONLY MY DOMAIN when
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Phonegap - Error - Keystore alias not recognized
- Can't use serve with Cordova / Phonegap hellow
- ionic - Copy/paste in input field in iOS 10 not wo
- PhoneGap iOS 7 and localStorage
- deviceready not firing in cordova
- net::ERR_CONNECTION_REFUSED ionic
- Phonegap - Missing App Store Icon 1024x1024px App
This error happened after cordova update 5.0.0.
Like Santosh said, you just need add the plugin https://github.com/apache/cordova-plugin-whitelist.git to your app and everything will work. I was getting the same error and i fixed with this plugin.
You will need add the follow code to your webconfig file:
Use this command with new CLI:
And in the
config.xml
no need to change the default settings which are:Here * represents anything so I solved my CORS problem using these settings.
Note:Don't forget to remove the platform after adding the plugin although it's added automatically there too but it's better to take precaution as you'll never know what might be the cause using
Then add again
With the updated version of cordova-android, you now need to include the cordova-whitelist-plugin.
https://github.com/apache/cordova-mobile-spec/tree/master/cordova-plugin-whitelist
Try adding that to your project
For example -
For more help read issue on https://github.com/driftyco/ionic/issues/3597