Ionic-framework: White screen: Use of const in strict mode.

Created on 30 Sep 2016  路  7Comments  路  Source: ionic-team/ionic-framework

Hi,

i can deploy to a real device and to a emulator using android 4.1.1, 4.2.2, 4.4.2.

But it always shows a white screen and in the console i can see the error Uncaught SyntaxError Use of const in strict mode.

The project is https://github.com/mariohmol/brigadistas and my system info is:

Cordova CLI: You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.3.1

Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1

Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.4.0
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v6.3.1
Xcode version: Xcode 7.3.1 Build version 7D1014 

Most helpful comment

Remember to clean your build before running in android after adding crosswalk. It didn't work for me until I ran "cordova clean" before building again.

All 7 comments

Hello! Thanks for using Ionic! While i cannot reproduce this issue on Android 4.4.2 you are going to see this and more issues on versions of android older than 4.4.2 unless you use crosswalk. Because of the lack of html5 and es6 support in version of Android older than 4.4.2 we recommend using Crosswalk if you plan on supporting those older version of Android. You can check out our docs for more info on Crosswalk. Thanks for using Ionic!

I've seen other posts saying that crosswalk was not fixing that. As we have webpack in the gulp build, doesnt it has a transpile for older js versions?

When i install crosswalk i receive back the message

After much discussion and analysis of the market, we have decided to discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20. So the minSdkVersion of Cordova project is configured to 16 by default.

Is this working for 4.x android versions?

And this docs links you sent me is not updated, i cant run ionic browser because i receive back browser is not a valid task.

We are talking about ionic2 , right? Seems to have same comments here: https://github.com/driftyco/ionic-cli/issues/1100

Here is saying about the ionic browser used in the docs is deprecated , https://forum.ionicframework.com/t/how-to-use-crosswalk-only-for-android/51065/2 ..

I dont get why i can make a ionic1 work in 4.1.1 but not ionic2 as we have webpack to transform to do not use ecma6

Could make that work!! =)

For those who get here:

  • ionic platform add browser
  • ionic build browser
  • ionic plugin add cordova-plugin-crosswalk-webview
  • Remove the old app from the device
  • cordova clean
  • ionic build
  • ionic run android

Remember to clean your build before running in android after adding crosswalk. It didn't work for me until I ran "cordova clean" before building again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daveshirman picture daveshirman  路  3Comments

BilelKrichen picture BilelKrichen  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

Nick-The-Uncharted picture Nick-The-Uncharted  路  3Comments

giammaleoni picture giammaleoni  路  3Comments