Application not working on Android KitKat 4.4.2
Ionic 2 Blank page was displayed for kitkat. Can you please update the minimum version required for ios, android in the documentation.
KitKat is definitely supported. However I do suggest using the Crosswalk plugin for anything below Android 5.
@dheran would you be able to tell me what version of ionic you were working with when you got this issue? There was a known issue with beta.4 that would cause white screens on some android devices. Also as far as android support goes we officially support android 4.1 and above, but we recommend you use crosswalk for anything below 4.4.4.
i tried beta 5
My managers will fire me for apk size if i use crosswalk
I tried beta 6 too. I'm getting blank page only. I can't use crosswalk because of size constraints.
@dheran Sorry about this! Are you getting any errors in the console?
@dheran How about Crosswalk Lite which is approximately half the size of the regular Crosswalk?
I also tested an Ionic 2 app on Android 4.4 and it's working, i.e. the problem might be somewhere else.
Could you provide more details about the problem that you're facing, e.g. error info, stacktrace, etc?
@jgw96 @iignatov
Yes there were errors (Android 4.4.2).
04-27 17:38:28.562: I/chromium(5160): [INFO:CONSOLE(30929)] "EXCEPTION: TypeError: Cannot redefine property: length in [{{appt.formattedDate | date : 'yMMMdjm'}} in PlayersListPage@19:29]", source: file:///android_asset/www/build/js/app.bundle.js (30929) 04-27 17:38:28.562: I/chromium(5160): [INFO:CONSOLE(30929)] "ORIGINAL EXCEPTION: TypeError: Cannot redefine property: length", source: file:///android_asset/www/build/js/app.bundle.js (30929) 04-27 17:38:28.562: I/chromium(5160): [INFO:CONSOLE(30929)] "ORIGINAL STACKTRACE:", source: file:///android_asset/www/build/js/app.bundle.js (30929) 04-27 17:38:28.562: I/chromium(5160): [INFO:CONSOLE(30929)] "TypeError: Cannot redefine property: length 04-27 17:38:28.562: I/chromium(5160): at defineProperty (native) 04-27 17:38:28.562: I/chromium(5160): at Function.Object.defineProperty (file:///android_asset/www/build/js/angular2-polyfills.js:1083:17) 04-27 17:38:28.562: I/chromium(5160): at freezeArray (v8/i18n:2004:8) 04-27 17:38:28.562: I/chromium(5160): at initializeLocaleList (v8/i18n:286:8) 04-27 17:38:28.562: I/chromium(5160): at resolveLocale (v8/i18n:1812:4) 04-27 17:38:28.562: I/chromium(5160): at initializeDateTimeFormat (v8/i18n:1149:7) 04-27 17:38:28.562: I/chromium(5160): at new Object.defineProperty.value.ax (v8/i18n:1227:8) 04-27 17:38:28.562: I/chromium(5160): at Function.DateFormatter.format (file:///android_asset/www/build/js/app.bundle.js:28941:25) 04-27 17:38:28.562: I/chromium(5160): at DatePipe.transform (file:///android_asset/www/build/js/app.bundle.js:6118:37) 04-27 17:38:28.562: I/chromium(5160): at AbstractChangeDetector.ChangeDetector_PlayersListPage_2.detectChangesInRecordsInternal (viewFactory_PlayersListPage:943:105)", source: file:///android_asset/www/build/js/app.bundle.js (30929) 04-27 17:38:28.562: I/chromium(5160): [INFO:CONSOLE(30929)] "ERROR CONTEXT:", source: file:///android_asset/www/build/js/app.bundle.js (30929) 04-27 17:38:28.582: I/chromium(5160): [INFO:CONSOLE(30929)] "[object Object]", source: file:///android_asset/www/build/js/app.bundle.js (30929)
@iignatov already my apk size was 12 MB. Crosswalk Lite would consume additional ~15 MB which will double the size of the apk and also I'm instructed to keep the apk size less.
@dheran It seems that there's a problem with the Angular polyfills on Chrome 35 or older:
@dheran are you using the date pipe available in angular 2?
@jgw96 yeah
Ahh, OK, so that's probably where the issue is coming from. Would you mind doing a test without the date pipe usage and see if you still get a white screen? Thanks!
Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!
same issue on android browser :+1: it happen only with datepipe in angular 2
Hello @windwp! Ionic 2 does not currently support the Android browser, although we do support chrome for Android. The date pipe uses the internationalization API which is not supported in older browsers such as the Android browser. Sorry for any hassle that causes you, and thanks for using Ionic!
Will it be fixed or it should be handled by developer?
Hey @dheran! The date pipe is actually built into Angular 2, so there's not much we can do on the Ionic end of things for it. As I stated before, we do require crosswalk for support of Android devices older than 4.4, and that does fix the date pipe issue for those versions of Android, but I'm not sure we will ever be able to support the Android browser, as it just does not have the html5 and JavaScript support Ionic 2 needs. Have you been able to give crosswalk lite a try? This should give you the Android support you need, but with a smaller apk size.
Don't worry about it Now i create a custom pipe use momentjs for display date. @dheran
Hello I'm facing the same issue as well, The Toolbar alignment breaks up in android 4.4 and below. When I first installed the app on Android 4.4.2 I got a blank screen. It works perfectly on Android 5.0 and above. What could be the issue for this? Is this issue resolved in beta 25?
@jgw96 I think this issue needs to be made clear in the docs somewhere to use Crosswalk for apps on Android < version 5.