Ionic run android vs ionic build android

Hi everybody.
I am compiling an application made with Ionic and the Crosswalk plugin.

When i use the command

ionic run android

I have splashscreens, fast UI, no scrollbars. Everything works very well!

When I use the command

ionic build android

the APK I obtain is completly different, no splash screen, no Crosswalk browser, slow UI…

Why is this happening? What are the differences between run and build, and how to uniform the results?
I have checked the code inside Cordova scripts finding no hints (run uses build to build).

Any help is appreciated! Thank you!

I am debugging the issue, and I have found the the bug raises when using --release option in build script.

ionic run android
=> 22M

ionic build android
=> 2 files, armv7 22M, x86 25M

ionic build android --release
=> 1 file, 2.5M

Why is --release command not using Crosswalk? How shall I fix this?

I saw this by @nraboy on a comment thread in his blog post https://blog.nraboy.com/2015/05/whitelist-external-resources-for-use-in-ionic-framework/#comment-2046190830

> I found it to have issues with cleanup, so often the build will be mangled on install. It creates a headache when trying to troubleshoot if it is your code with the problems or just a messed up build.
> Use “ionic run” as you’d like, but just know I’m not the only person having these problems.

it’s not an answer but it’s a start :wink:

1 Like

I came accross this same problem - run and build give me different APKs. The one made with run works well, the one with build gives me white screen.
LogCat shows this error repeating constantly: Cannot call determinedVisibility()

Anybody found a solution?