ngCordova icon indicating copy to clipboard operation
ngCordova copied to clipboard

Blank White Screen

Open zinouker opened this issue 8 years ago • 6 comments

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

zinouker avatar Oct 10 '17 14:10 zinouker

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.

  1. Go to index.html and change base href from: <base href="/"> to: <base href="file:///android_asset/www/"> or simple: <base href=".">

  2. 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!

NavCore avatar Oct 15 '17 09:10 NavCore

Hello @NavCore i tried cordova build android and I install the debug apk on my device, but still blank screen

yozawiratama avatar Apr 09 '18 16:04 yozawiratama

I changed base href, but still not working.

jair-anderson-souza avatar Jun 10 '18 23:06 jair-anderson-souza

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.

rwoody avatar Jun 26 '18 16:06 rwoody

same issue, I got this error : common.es5.js:3084 Uncaught TypeError: undefined is not a function

cesarin3134 avatar Jul 06 '18 13:07 cesarin3134

I fixed it uncomment all imports into polyfills.ts

cesarin3134 avatar Jul 07 '18 18:07 cesarin3134