Search code examples
androidangularcordovaionic-frameworkionic4

Failed to load resource with Ionic in build Android


When I use the ionic serve command, I have no problem.

When I use the command ionic cordova run android --livereload --consolelogs, sometimes I have no problem, sometimes I have a blank page.

When I do a build on android I have a blank page all the time that appears, I've been looking for a solution for several days.

What i have already tried :

  • Uninstall and install android platform
  • Uninstall and install ionic and cordova
  • Add cordova-plugin-whitelist plugin - ionic plugin add cordova-plugin-whitelist
  • Clear cookies/cache
  • npm install @ionic/app-scripts@latest --save-dev

Here are different errors that appear randomly enter image description here enter image description here

I have no errors during the build.


Solution

  • Adding the following meta seems to have solved the problem in config.xml :

    <access launch-external="yes" origin="tel:*" />
    <preference name="LoadUrlTimeoutValue" value="20000" />