I can not test my Ionic application

0

I'm having a lot of trouble testing my Ionic application. As it has HttpClient requests, I'm having issues with the Cors. I thought about generating the production build and testing on my cell phone, so I tested:

cordova build android --prod

The app is generated, I copy to my phone and perform the installation, but when I go to run it returns:

  

err_conecttion_refused: localhost: 8080

I've also tried: cordova build android --prod --release But in this case I can not install the application. How do you test apps that have http requests?

    
asked by anonymous 07.08.2018 / 17:17

1 answer

0

The problem is the new version of cordova-plugin-ionic-webview 2.0 that breaks compatibility with Android 4.4.

The solution is to move to version 1.2.1:

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add [email protected]
ionic cordova platforms remove android
rm -rf plugins
ionic cordova build android

I hope I have helped. Good luck! ;)

    
07.08.2018 / 17:22