Just ionic cordova build android --prod --release
It seems it only happens with devices having Android 4.4
Here is another feedback I received today
Just ionic cordova build android --prod --release
It seems it only happens with devices having Android 4.4
Here is another feedback I received today
Same problem without --prod --release
?
Could you create a pure Cordova project with cordova create
, add the same cordova-android as in your project, and then build/run it via cordova build android
?
Thanks for your help but the problem is the new version of cordova-plugin-ionic-webview 2.0 which breaks the compatibility with Android 4.4⦠I found the solution on another thread:
I have a problem net::ERR_CONNECTION_REFUSED
For future readers of this topic:
If the device you are testing on is using Android 4.x (e.g. Android 4.4 KitKat), this article might explain what is going on and how to fix it: https://ionic.zone/debug/ionic-and-android-4
This error is fixed in the latest release 2.1.4ā¦
ionic cordova plugin rm cordova-plugin-ionic-webview
ionic cordova platforms remove android
cordova plugin add cordova-plugin-ionic-webview
npm install @ionic-native/ionic-webview
ā¦includes a fix for the webview in KitKat.
thanks for sharing! worked for me, too.
Really @IonicGeoff? https://github.com/ionic-team/cordova-plugin-ionic-webview/blob/master/CHANGELOG.md#220-pending only mentions it for an upcoming 2.2.0 release.
Works for me!
It seems to have implemented the changes made hereā¦
Not really, the PR in the changelog is this: https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/172/files
actually i forget to call ionic cordova build android
. I get this error ionic cordova platform add android
then send to my phone without run build command. Cause there are no files under the www
folder. Be sure, you are have got files under the www
files.
I had the same issue.
In the browser (ionic serve) everything was fine, but the same error with the emulator and real device.
It was a problem with the server dev/smartphone.
I launch the app with livereload and everything works fine.
ionic cordova run android --livereload
@Ionic Team: I also have that issue, none of the solitions above worked. It happens in the emulator and on the real device. Itās really time consumingā¦Can you provide a solution, that works for all???
hi i am also facing same issue
import { HttpClient } from ā@angular/common/httpā;
this.http.get(url).subscribe((response) => {
this.appointment_types=response;
});
i am getting result in browser but not getting response in real device in android
please provide a solution i am using ionic 4 i am getting error like
zone.js:3243 GET http://localhost:8100/sockjs-node/info?t=1559937025579 net::ERR_CONNECTION_REFUSED
I am facing this problem on a device with Android 6, that fix you mentioned you are using Ionic 4, right?
How about the android platform version? What is it?
Mine is 6.3.0 (not sure why).
Itās just a very simple project with Ionic 4, with a map only.
Can you post your āionic infoā output, and also describe the steps to get the error.
Sure Ii can,
Ionic Info:
Ionic:
Ionic CLI : 5.2.2 (/Users/francisco/.npm-packages/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
Cordova:
Cordova CLI : 7.1.0
Cordova Platforms : android 6.3.0, browser 5.0.4, ios 5.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 5 other plugins)
Utility:
cordova-res : 0.5.1 (update available: 0.6.0)
native-run : 0.2.7 (update available: 0.2.8)
System:
Android SDK Tools : 26.1.1 (/Users/francisco/Library/Android/sdk)
ios-deploy : 2.0.0
ios-sim : 7.0.0
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 6.10.1
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
> cordova plugin ls
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
Running on an Android device (just the same way I always did) in debug mode:
% ionic cordova run android -l -c --device --verbose --no-native-run
In my case it shows:
net::ERR_CONNECTION_REFUSED (http://localhost:8100/)
This is a very simple project in Ionic4, but I also have another one in Ionic3 thatās happening the same problem.
The device is a Samsung S5 with Android 6.0 (SM-G900M)
BTW, thanks for replying!