While trying to run my ionic app on android device, “ionic run android” and “ionic run android -l”, commands show completely different behavior.
ionic run android -l
This runs as expected, splashscreen works just fine and images are displayed where they should. Other cordova plugins like “$cordovaNetwork” work just fine as well.
However, if I run
ionic run android
(notice the missing ‘-l’ argument) on the same app, splashscreen gets stuck at .hide(). Even the images are not rendered and instead image-not-found(that broken screen icon) shows up. So the generated apk is useless.
I know I’m doing something stupid, but can’t figure out what. I’m pulling my hair over this issue, because it doesn’t make any sense. Any help will be greatly appreciated.
The live reload functionality is similar to ionic serve, but instead of developing and debugging an app using a standard browser, the compiled hybrid app itself is watching for any changes to its files and reloading the app when needed. This reduces the requirement to constantly rebuild the app for small changes.
You should also consider that livereload is still in beta. Maybe it caused a problem with a classic building process.
Of course, this is just a wild guess.
From my experience, you’re not the first person asking about this problem. Try looking at previous posts, maybe you stumble on a working solution.
I think:
Execute this command on terminal " adb kill-server"
Now connect device to system wait, 10-20 seconds.
Execute this command on terminal " adb start-server",
Check device status with "adb devices " command.
So I just tested this using a starter template from out cli
ionic start tmp blank && cd tmp
Added a few images tags
ionic platform add android
ionic run android --device
Everything worked fine for me. @amitoj you mentioned you were using ionic-boilerplate? That’s not the starter templates that come with the ionic cli is it?