White screen after splash screen Ionic-v4

Without --release --prod my APK works fine but when building for production I get the white screen for ever.
I have tried the below steps

  • Added <preference name=“loadUrlTimeoutValue” value=“700000” /> in config.xml

  • Tried hiding splash screen after timeout

  • Tried renaming index to main and added window.location in index file

  • Tried removing cordova android platform and reinstalling

  • Removed the node modules folder and reinstalled

  • Reinstalled all cordova plugins

  • Also added super.loadurl in mainactivity file

  • Changed base href to “.” from “/”

But nothing worked and when i build using the command ionic cordova build android --prod

I get a debug apk which i debugged using chrome remote debugging and I get the below errors

How do I resolve this issue ?

try autohidesplash screen is false…

@gokujy I mentioned i tried that too

Thanks and for those who face the similar issue kindly check your dependency.In my case I didn’t add the network ionic plugin in my app.module.ts providers.

Can you be a bit more specific about how it should look like after the import?

I’m new to ionic and doing some maintenance on a pre-existing app and having this issue.

@baratacom Are you using ionic angular ? If so then in your app.module.ts there is something called providers section where you have to add the ionic plugins you have used in your app.In my case i used something called network to check the network availability so I have added network to that providers in app.module.ts.Hope this helps.

I am, and checking that file everything seems to be correctly in place.