Blank White Screen
When i run : 'cordova run android' command i'm getting blank white screen !!!! 'cordova run browser' works perfectly and there is no error in console
Hi my friend! Sorry for my late reply.
Yes indeed there is a problem with Android app, but it that's normal because our Angular project has base directory set to "/" and Android doesn't know where the "/" is.
-
Go to index.html and change base href from:
<base href="/">to:<base href="file:///android_asset/www/">or simple:<base href="."> -
After that, if we try to emulate android app in emulator (cordova emulate android), it will show white screen again. But, that's because there is some problem with emulator. Just connect android phone and run the app using: cordova run android and you should see a working app!
Hello @NavCore i tried cordova build android and I install the debug apk on my device, but still blank screen
I changed base href, but still not working.
I don't see the deviceready event being listened to anywhere. You may need to change this line to:
document.addEventListener('deviceready', () => {
platformBrowserDynamic().bootstrapModule(AppModule);
}, false);
Otherwise, you could cause errors trying to access Cordova plugins that are not yet available.
same issue, I got this error : common.es5.js:3084 Uncaught TypeError: undefined is not a function
I fixed it uncomment all imports into polyfills.ts