Ionic 2 APP won't run in earlier than Android 5.0?


#1

A whitescreen is shown and nothing happens.
Debugged and I got it:

Uncaught TypeError: Cannot call method ‘bind’ of undefined at file:///android_asset/www/build/js/app.bundle.js:61557

So won’t it work earlier than 5.0?


#2

up, need help about this


#3

@fel486 I would suggest you to update your project to beta.6 which contains many bug fixes (few of them are critical). Make sure to follow the steps in the linked topic (especially steps 3 & 4) because the update is not quite trivial. It will most probably solve your problem but if it still exists after the update then paste the error’s callstack here.


#4

I have no luck running an Ionic2 app on Android 4.3.
I too get the white screen.
This is not an app to be updated as suggested above, this is a new app using this command:
ionic start test blank --v2 --ts

And my ionic info is:
Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS:
Node Version: v5.10.1


#5

Sadly, didn’t work, even updating…

I got this:

04-26 14:21:14.892 D/AndroidRuntime(13151): 04-26 14:21:14.892 D/AndroidRuntime(13151): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 04-26 14:21:14.892 D/AndroidRuntime(13151): CheckJNI is OFF 04-26 14:21:14.902 D/dalvikvm(13151): Trying to load lib libjavacore.so 0x0 04-26 14:21:14.906 D/dalvikvm(13151): Added shared lib libjavacore.so 0x0 04-26 14:21:14.909 D/dalvikvm(13151): Trying to load lib libnativehelper.so 0x0 04-26 14:21:14.909 D/dalvikvm(13151): Added shared lib libnativehelper.so 0x0 04-26 14:21:15.002 D/AndroidRuntime(13151): Calling main entry com.android.commands.settings.SettingsCmd 04-26 14:21:15.002 D/dalvikvm(13151): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods 04-26 14:21:15.006 D/AndroidRuntime(13151): Shutting down VM 04-26 14:21:15.262 D/SettingsProvider( 2742): User 0 external modification to /data/data/com.android.providers.settings/databases/settings.db; event=8 04-26 14:21:15.262 D/SettingsProvider( 2742): User 0 updating our caches for /data/data/com.android.providers.settings/databases/settings.db 04-26 14:21:16.362 I/AndyroidAnalytics(19526): Sending event to Flurry : app.launched 04-26 14:21:16.362 I/AndyroidAnalytics(19526): Params of the event : launched_package : com.ionicframework.cutepuppypics985791 04-26 14:21:16.362 I/AndyroidAnalytics(19526): Params of the event : source_type : workspace 04-26 14:21:16.362 I/AndyroidAnalytics(19526): Params of the event : source_name : screen:2 04-26 14:21:16.366 I/ActivityManager( 2742): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ionicframework.cutepuppypics985791/.MainActivity bnds=[131,204][227,300]} from pid 19526 04-26 14:21:16.379 I/audio_utils_zmq( 1502): opening pcm with sampling rate 44100 04-26 14:21:16.472 D/SettingsProvider( 2742): User 0 external modification to /data/data/com.android.providers.settings/databases/settings.db; event=8 04-26 14:21:16.472 D/SettingsProvider( 2742): User 0 updating our caches for /data/data/com.android.providers.settings/databases/settings.db 04-26 14:21:16.509 D/dalvikvm(13224): Late-enabling CheckJNI 04-26 14:21:16.509 I/ActivityManager( 2742): Start proc com.ionicframework.cutepuppypics985791 for activity com.ionicframework.cutepuppypics985791/.MainActivity: pid=13224 uid=10064 gids={50064, 3003, 1028} 04-26 14:21:16.512 D/AppMonitor( 3987): State of com.ionicframework.cutepuppypics985791.MainActivity changed to LAUNCHED at 1547830261548 04-26 14:21:16.512 D/AppMonitor( 3987): State of com.andyroid.launcher.Launcher changed to BACKGROUND at 1547830261548 04-26 14:21:16.626 E/Trace (13224): error opening trace file: No such file or directory (2) 04-26 14:21:16.699 I/dalvikvm(13224): Could not find method android.app.Activity.checkSelfPermission, referenced from method org.apache.cordova.CordovaInterfaceImpl.hasPermission 04-26 14:21:16.699 W/dalvikvm(13224): VFY: unable to resolve virtual method 1: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I 04-26 14:21:16.699 D/dalvikvm(13224): VFY: replacing opcode 0x6e at 0x0009 04-26 14:21:16.702 I/dalvikvm(13224): Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermission 04-26 14:21:16.702 W/dalvikvm(13224): VFY: unable to resolve virtual method 24: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V 04-26 14:21:16.702 D/dalvikvm(13224): VFY: replacing opcode 0x6e at 0x000c 04-26 14:21:16.702 I/dalvikvm(13224): Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermissions 04-26 14:21:16.702 W/dalvikvm(13224): VFY: unable to resolve virtual method 24: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V 04-26 14:21:16.706 D/dalvikvm(13224): VFY: replacing opcode 0x6e at 0x0006 04-26 14:21:16.712 I/dalvikvm(13224): Could not find method android.webkit.WebView.setWebContentsDebuggingEnabled, referenced from method org.apache.cordova.engine.SystemWebViewEngine.enableRemoteDebugging 04-26 14:21:16.712 W/dalvikvm(13224): VFY: unable to resolve static method 244: Landroid/webkit/WebView;.setWebContentsDebuggingEnabled (Z)V 04-26 14:21:16.716 D/dalvikvm(13224): VFY: replacing opcode 0x71 at 0x0001 04-26 14:21:16.799 I/dalvikvm(13224): Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.engine.SystemCookieManager.<init> 04-26 14:21:16.799 W/dalvikvm(13224): VFY: unable to resolve virtual method 196: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V 04-26 14:21:16.799 D/dalvikvm(13224): VFY: replacing opcode 0x6e at 0x0016 04-26 14:21:16.799 I/dalvikvm(13224): Could not find method android.webkit.CookieManager.flush, referenced from method org.apache.cordova.engine.SystemCookieManager.flush 04-26 14:21:16.799 W/dalvikvm(13224): VFY: unable to resolve virtual method 191: Landroid/webkit/CookieManager;.flush ()V 04-26 14:21:16.799 D/dalvikvm(13224): VFY: replacing opcode 0x6e at 0x0008 04-26 14:21:16.829 W/dalvikvm(13224): VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;) 04-26 14:21:16.832 W/dalvikvm(13224): VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;) 04-26 14:21:16.832 I/dalvikvm(13224): Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.engine.SystemWebViewClient.onReceivedClientCertRequest 04-26 14:21:16.832 W/dalvikvm(13224): VFY: unable to resolve virtual method 249: Landroid/webkit/WebViewClient;.onReceivedClientCertRequest (Landroid/webkit/WebView;Landroid/webkit/ClientCertRequest;)V 04-26 14:21:16.832 D/dalvikvm(13224): VFY: replacing opcode 0x6f at 0x001a 04-26 14:21:16.836 W/dalvikvm(13224): VFY: unable to find class referenced in signature (Landroid/webkit/PermissionRequest;) 04-26 14:21:16.836 I/dalvikvm(13224): Could not find method android.webkit.PermissionRequest.getResources, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onPermissionRequest 04-26 14:21:16.836 W/dalvikvm(13224): VFY: unable to resolve virtual method 207: Landroid/webkit/PermissionRequest;.getResources ()[Ljava/lang/String; 04-26 14:21:16.836 D/dalvikvm(13224): VFY: replacing opcode 0x6e at 0x000d 04-26 14:21:16.836 I/dalvikvm(13224): Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onShowFileChooser 04-26 14:21:16.836 W/dalvikvm(13224): VFY: unable to resolve virtual method 212: Landroid/webkit/WebChromeClient$FileChooserParams;.createIntent ()Landroid/content/Intent; 04-26 14:21:16.836 D/dalvikvm(13224): VFY: replacing opcode 0x6e at 0x0000 04-26 14:21:16.839 D/SystemWebViewEngine(13224): CordovaWebView is running on device made by: Andy OS Inc. 04-26 14:21:16.842 V/StatusBar(13224): StatusBar: initialization 04-26 14:21:16.879 D/dalvikvm(13224): No JNI_OnLoad found in /system/lib/libandyprop.so 0x0, skipping init 04-26 14:21:16.979 D/libEGL (13224): loaded /system/lib/egl/libEGL_emulation.so 04-26 14:21:16.992 I/AndyHostConnection(13224): buffer size: 4194304 04-26 14:21:16.992 I/AndyHostConnection(13224): VSockStream connecting to 2:1025 04-26 14:21:17.012 D/HostConnection(13224): HostConnection::get() New Host Connection established 0xb7b6f4b0, tid 13224 04-26 14:21:17.016 D/AndroidRuntime(13264): 04-26 14:21:17.016 D/AndroidRuntime(13264): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 04-26 14:21:17.016 D/AndroidRuntime(13264): CheckJNI is OFF 04-26 14:21:17.022 D/libEGL (13224): loaded /system/lib/egl/libGLESv1_CM_emulation.so 04-26 14:21:17.026 D/libEGL (13224): loaded /system/lib/egl/libGLESv2_emulation.so 04-26 14:21:17.052 D/dalvikvm(13264): Trying to load lib libjavacore.so 0x0 04-26 14:21:17.056 D/dalvikvm(13264): Added shared lib libjavacore.so 0x0 04-26 14:21:17.072 D/dalvikvm(13264): Trying to load lib libnativehelper.so 0x0 04-26 14:21:17.072 D/dalvikvm(13264): Added shared lib libnativehelper.so 0x0 04-26 14:21:17.072 W/EGL_emulation(13224): eglSurfaceAttrib not implemented 04-26 14:21:17.086 D/OpenGLRenderer(13224): Enabling debug mode 0 04-26 14:21:17.149 D/JsMessageQueue(13224): Set native->JS mode to OnlineEventsBridgeMode 04-26 14:21:17.162 I/ActivityManager( 2742): Displayed com.ionicframework.cutepuppypics985791/.MainActivity: +702ms 04-26 14:21:17.219 D/AndroidRuntime(13264): Calling main entry com.android.commands.settings.SettingsCmd 04-26 14:21:17.226 D/dalvikvm(13264): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods 04-26 14:21:17.246 D/AndroidRuntime(13264): Shutting down VM **_04-26 14:21:17.479 E/Web Console(13224): Uncaught TypeError: Cannot call method 'bind' of undefined at file:///android_asset/www/build/js/app.bundle.js:61553_** 04-26 14:21:17.526 V/StatusBar(13224): Executing action: _ready 04-26 14:21:17.529 D/TilesManager(13224): Starting TG #0, 0xb7a4dc48 04-26 14:21:17.529 D/TilesManager(13224): new EGLContext from framework: b7b74528 04-26 14:21:17.529 D/GLWebViewState(13224): Reinit shader 04-26 14:21:17.552 D/GLWebViewState(13224): Reinit transferQueue 04-26 14:21:17.572 D/AndyIME ( 3593): onFinishInput 04-26 14:21:17.859 D/SettingsProvider( 2742): User 0 external modification to /data/data/com.android.providers.settings/databases/settings.db; event=8 04-26 14:21:17.859 D/SettingsProvider( 2742): User 0 updating our caches for /data/data/com.android.providers.settings/databases/settings.db 04-26 14:21:18.912 D/AndroidRuntime(13352): 04-26 14:21:18.912 D/AndroidRuntime(13352): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 04-26 14:21:18.912 D/AndroidRuntime(13352): CheckJNI is OFF 04-26 14:21:18.926 D/dalvikvm(13352): Trying to load lib libjavacore.so 0x0 04-26 14:21:18.926 D/dalvikvm(13352): Added shared lib libjavacore.so 0x0 04-26 14:21:18.932 D/dalvikvm(13352): Trying to load lib libnativehelper.so 0x0 04-26 14:21:18.932 D/dalvikvm(13352): Added shared lib libnativehelper.so 0x0 04-26 14:21:19.182 D/AndroidRuntime(13352): Calling main entry com.android.commands.settings.SettingsCmd 04-26 14:21:19.182 D/dalvikvm(13352): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods 04-26 14:21:19.182 D/SettingsProvider( 2742): User 0 external modification to /data/data/com.android.providers.settings/databases/settings.db; event=8 04-26 14:21:19.182 D/SettingsProvider( 2742): User 0 updating our caches for /data/data/com.android.providers.settings/databases/settings.db 04-26 14:21:19.202 D/AndroidRuntime(13352): Shutting down VM


#6

@fel486 I haven’t seen this error before, but a quick search returned the following similar topic:

I also found the following issue about Android 4.3 (the recommendation is to use crosswalk):

I tested a Ionic 2 app on Android 4.4 and Android 5.0 and it works fine. If you’re planning to support devices with Android older than 4.4 then I’ll recommend you to check out Crosswalk. To add crosswalk to your project run ionic plugin add cordova-plugin-crosswalk-webview from inside of your project’s folder.


#7

That’s more serious than you think. I need to support at least 4.1, which has still a good part of devices, at least on my country.
I’ve tried also crosswalk but no success, and also I saw previously this search.

For me Crosswalk has no effect, and that worries me because of able only to run in android 5.0…

Hope they fix this soon.

Please up


#8

@fel486 It seems that 4.1 might be not supported (reason: it’s really hard to support those older Android webviews and still have good performance) but this could be solved by using crosswalk (as you can read here, here, here, here, etc).

And here is an official response on the topic (check out the linked topic for more details and stats):

Also it’s very misleading to claim that Ionic won’t run on Android older than 5.0 when ~33% of the devices are with Android 4.4 which is supported by Ionic - check out the Android Developer Dashboards and you will see that:

  • ~74% of the devices run Android 4.4 or later - supported by Ionic.
  • ~21% of the devices run Android 4.1 - 4.3 - it’s recommended to use Crosswalk (even if there versions are supported by Ionic I guess that it the performance would be so poor that the apps will be barely usable).
  • ~5% of the devices run Android 4.0 or older - not officially supported by Ionic (but I guess that half of them might be supported by using crosswalk).

If you’re having problems to integrate crosswalk into you project you could search the forum or if something is not working as expected then open an issue with details about your problem.

Moreover the Ionic framework is an open-source project, which means that if something is not working in your case you can try to fix it and make a PR.


Ionic 2 issues (android 4.2 - click delays/white screen on app resume/ css issues)
#9