ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Application not working on Android KitKat 4.4.2

Open TheMohanraj opened this issue 10 years ago • 37 comments

Ionic 2 Blank page was displayed for kitkat. Can you please update the minimum version required for ios, android in the documentation.

TheMohanraj avatar Apr 22 '16 10:04 TheMohanraj

KitKat is definitely supported. However I do suggest using the Crosswalk plugin for anything below Android 5.

dylanvdmerwe avatar Apr 22 '16 11:04 dylanvdmerwe

@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.

jgw96 avatar Apr 22 '16 16:04 jgw96

i tried beta 5

TheMohanraj avatar Apr 25 '16 05:04 TheMohanraj

My managers will fire me for apk size if i use crosswalk

TheMohanraj avatar Apr 25 '16 10:04 TheMohanraj

I tried beta 6 too. I'm getting blank page only. I can't use crosswalk because of size constraints.

TheMohanraj avatar Apr 25 '16 13:04 TheMohanraj

@dheran Sorry about this! Are you getting any errors in the console?

jgw96 avatar Apr 25 '16 15:04 jgw96

@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?

iignatov avatar Apr 27 '16 10:04 iignatov

@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.

TheMohanraj avatar Apr 27 '16 12:04 TheMohanraj

@dheran are you using the date pipe available in angular 2?

jgw96 avatar Apr 27 '16 14:04 jgw96

@jgw96 yeah

TheMohanraj avatar Apr 28 '16 05:04 TheMohanraj

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!

jgw96 avatar Apr 28 '16 14:04 jgw96

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!

jgw96 avatar May 10 '16 19:05 jgw96

same issue on android browser :+1: it happen only with datepipe in angular 2

windwp avatar May 18 '16 07:05 windwp

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!

jgw96 avatar May 18 '16 14:05 jgw96

Will it be fixed or it should be handled by developer?

TheMohanraj avatar May 18 '16 14:05 TheMohanraj

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.

jgw96 avatar May 18 '16 14:05 jgw96

Don't worry about it Now i create a custom pipe use momentjs for display date. @dheran

windwp avatar May 19 '16 00:05 windwp

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?

chandanch avatar Jun 13 '16 05:06 chandanch

@jgw96 I think this issue needs to be made clear in the docs somewhere to use Crosswalk for apps on Android < version 5.

dylanvdmerwe avatar Jun 13 '16 05:06 dylanvdmerwe