getting net::ERR_CONNECTION_REFUSED (http://localhost:8080) on android 4.4.2 version
Your problem is caused by the cordova-plugin-ionic-webview
plugin that is part of every new or updated Ionic app.
This used to apply only to iOS, where it replaced the UIWebView with WKWebView, but on July 23rd 2018 they released version 2.0 of the plugin, that also included changes to the webview used on Android.
The Android webview now uses a local webserver at localhost:8080
to show your app instead of requesting the files directly from the file system.
Unfortunately this change also included this bit in the documentation:
Requirements
- […]
- Android: Android 5.0+ and cordova-android 6.4+
So cordova-plugin-ionic-webview
just doesn’t support Android earlier than 5.0 any more, which of course means your app will not work on Android 4.x.
One solution is to downgrade the plugin to the last version that supported Android 4.x:
ionic cordova plugin add cordova-plugin-ionic-webview@1.2.1
More elaborate information and alternative solutions:
https://ionic.zone/debug/ionic-and-android-4
Ionic app doesn't hit on server when using cordova
You need something to proxy the localhost:8080 requests from the android device back to your dev box where the livereload server is running.
You can do this through port forwarding via the chrome browser by opening chrome://inspect/#devices
on your dev box, or else configure port forwarding directly on the phone's connection properties itself. I use this to watch traffic via Fiddler on windows dev boxes.
Also, ionic livereload server can be configured to route non-ionic traffic by configuring service proxies.
Related Topics
How to Get Imsi Number in Android Using Command Line
Android Emulator Is Start But Window Show Blank Screen
React Native | Failed to Install the App. Please Accept All Necessary Sdk Licenses Using Sdk Manager
How to Set Up Android Studio to Work Completely Offline
How to Format Credit Card Expiry Date in Mm/Yy When Entered by User
Adb.Exe Not Found After Installing Android Studio
How to Use Python to Execute Adb Commands
How to Check If a Value Exists Already in a Firebase Data Class Android
How to Go Back to Previous Fragment from Activity
Why Livedata Observer Is Being Triggered Twice for a Newly Attached Observer
How to Set Align (Right or Left) of Text in Textview, Programmatically
React Native: Java_Home Is Not Set and No 'Java' Command Could Be Found in Your Path
Why Does My Button Not Showing in the Layout
Method to Refresh Fragment Content When Data Changed ( Like Recall Oncreateview)
How to Set Spinner Default by Its Value Instead of Position
Cart Item Count Increment/Decrement & Add to Cart
How to Get the Current Gps Location Programmatically in Android
Fragment Is Not Being Replaced But Put on Top of the Previous One