Simple Ionic 3 App Not Working on Android Device

@dumdem Like he said, the problem is about the Android version (in your case, 4.3) and the new version of the cordova-plugin-ionic-webview.

So you can run:

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@1.2.1
ionic cordova platforms remove android
rm -rf plugins
ionic cordova build android

The above will:

  1. Remove the cordova-plugin-ionic-webview that you are using.
  2. Install version 1.2.1 (that supports Android 4.4+, though I don’t know about 4.3).
  3. Remove the android platform (to add again later).
  4. Remove the plugins (to add again later, they should be defined in the config.xml file).
  5. Add the Android platform and the plugins it depends on, and build your app.

ionic cordova platforms remove android (should I run this command?)

I advise you to run it because sometimes the plugins won’t install correctly without a fresh install (just make sure you don’t have made any manual changes to files in the /platforms/android/ folder, and instead used build/hook scripts to populate it).

rm -rf plugins ( error: rm command not found )

If you are on Windows you can just delete the plugins folder in your project, instead of running this command (like with the platforms folder, just make sure you don’t have made any manual changes to files in the /plugins/ folder).

It show white screen of death on my mobile and nothing displayed.

First run the above commands and only after running them successfully try to run your app.

If the error persists, try to create a blank project and then run it in an Android device to see if it works.

1 Like