Ionic-cli: ionic cordova run android --livereload does not work with a default project

Created on 30 Sep 2019  路  4Comments  路  Source: ionic-team/ionic-cli

I have start a project with this:

nvm install 10.16.3
nvm use 10.16.3
npm install -g ionic
npm install -g cordova
ionic start myApp tabs --cordova
cd myApp
ionic cordova run android --livereload

Without --livereload the app works:

2019-09-30_10h07_50

But with --livereload I have just a white screen and this:

BUILD SUCCESSFUL in 2s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
        C:\test\myApp\platforms\android\app\build\outputs\apk\debug\app-debug.apk
> native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-debug.apk
[native-run] No hardware devices found, attempting emulator...
[native-run] Selected emulator emulator-5554
[native-run] Installing platforms\android\app\build\outputs\apk\debug\app-debug.apk...
[native-run] Starting application activity io.ionic.starter/io.ionic.starter.MainActivity...
[native-run] Run Successful

image

I'm using VScode with Git Bash on Windows 10.

triage

Most helpful comment

It's probably a problem with the SDK, it works with ionic cordova run android --device --livereload.

All 4 comments

It's probably a problem with the SDK, it works with ionic cordova run android --device --livereload.

@Zefling If you see a white screen, the best thing to do is use Chrome DevTools to remotely see the error: https://ionicframework.com/docs/building/android#debugging-android-apps

I also encountered this problem. devtool log nothing and do not load anything from www directory.
image
this is my development env
image

Angular 8.0 auto load bundled script by module type if target is set to 2015 in tsconfig.json, so old browser can not load these script.

Was this page helpful?
0 / 5 - 0 ratings