App struck on white screen, only when I generate apk from my local machine

My app works fine when I run it on emulator or if I run the app on real device with command ‘ionic cordova run android’. It also works fine, if I generate the apk from the ionic dashboard and install on my device. But if I generate the apk on my local machine using the command, ‘ionic cordova build android --prod --build’, app stuck on white blank screen. What might the problem.

My system’s ionic info is as below


ionic (Ionic CLI) : 4.12.0 (C:\Users\kishore\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.3


cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0, browser 5.0.3
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 2.0.3, (and 20 other plugins)


Android SDK Tools : 26.1.1 (C:\Users\kishore\AppData\Local\Android\Sdk)
NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10