We add the Capacitor blob writer for more efficient write operations. On top of that we need the following plugins for our file explorer: Since Capacitor 3 we need to install the Filesystem plugin from its own package. Ionic Android Debugging: There was a network error was originally published in Code Pure and Simple on Medium, where people are continuing the conversation by highlighting and responding to this story. We start with a blank Ionic app and enable Capacitor. If that happens, open your index.html file add the following META tag. $ cordova plugin add a bit of a head-scratcher, you can end up with an error once your app starts running on your android that says, “There was a network error” running on port 8100 by default. Not as good as being able to step through the code in Visual Studio, but still very helpful for troubleshooting. This enables you to see console.log() statements in your code. One way to help debug issues deployed to your android device is to use the livereload and consolelogs options: ionic run android -l -c Naturally one option is to downgrade the plugin in your app to the last version that supported Android 4.Debugging an Ionic app using Visual Studio (Cordova Project) is very simple using Ripple however, once you deploy to a device it becomes a lot more challenging. Downgrade the webviewĬordova-plugin-ionic-webview used to work on Android 4.x just fine before 2.x was released. Check the general market numbers and especially usage numbers of your own apps already in the Play Console if you might be able to drop support for Android 4.x. Find out if you can avoid supporting Android 4.x devicesĪndroid 4.4 (KitKat) was released in Octoand its continued use makes Android apps much harder to develop and support. To use Cordova for this process instead, use the -no-native-run option. Finally, the native-run utility is used to run your app on a device. Fix Version/s: None Component/s: Android, Cordova, Ionic, iOS. Resolution: Unresolved Affects Version/s: 3.9.5. Then, cordova build is used to compile and prepare your app. MOBILE-3885 Unable to run on ios nor android with the last 3.9.5 version. You might also want to create an issue or vote and comment on existing issues about the problem. This should give you something like this at the end: App running at: - Local: - Network: If you are wanting to run this on an actual iOS device on your network, then you will need to use your servers ip address. This command will first use ionic build to build web assets (or ionic serve with the -livereload option). Get the problem heardīefore you do anything else, check the open Pull Requests of cordova-plugin-ionic-webview and thumbs-up any PR that adds support for older Android versions like e.g. Debugging faster on iOS & Android with -livereload. new app running in the iOS Simulator shortly Enable Live Reload: Turning Live Reload. Build your app and install it on your device by running ionic run ios -device. To confirm that you are running a 2.x version of the plugin, use the command ionic cordova plugins. Search for jobs related to Error network error in react native ios. It also appears that the Legacy or New Build. I have been testing with this a majority of the day and has been difficult to nail down the issues. When I try ionic cordova run ios -l or -livereload it acts like it is building and no errors but it hangs on the splashscreen and wont go beyond that. Android: Android 5.0+ and cordova-android 6.4+Īnd that is the problem: cordova-plugin-ionic-webview, which is part of any newly created or updated Ionic app, just doesn’t support Android earlier than 5.0 any more, which of course means your app will not work on Android 4.x. I resolved that issue and both ionic cordova run ios and cordova run ios are launching the app.Unfortunately this change also included this bit in the documentation: 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. Back then this only applied to iOS.īut on July 23rd 2018 they released version 2.0 of the plugin, that also included changes to the webview used on Android. You are on this page because you have problems with your Ionic app on Android 4.x (probably Android 4.4, KitKat) and are getting this error:īack in October 2017 Ionic introduced cordova-plugin-ionic-webview to support WKWebView in iOS apps (instead of the traditional but deprecated UIWebView) and since then added it to new Ionic apps by default. First published: August 2018 Why current Ionic apps don’t work with Android 4.x any more - and suggested solutions
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |