Live reload on android real device ionic4

Hi,
I am new to ionic and app development.
I am using visual studio code and unfortunately I have big problems setting up emulators (company laptop/hyper-v etc). Already spent a long time troubleshooting but no luck.

So I keep bulding and running on the device.
But it’s slow and painful.

I have researched and I havent found a way to enable the live reload on an external device in ionic 4?

thanks

try to add --watch flag the end of run command

or you can add it to your package.json scripts

and start using more smart IDE

like webstorm

Add in your VSCODE the plugin CORDOVA TOOLS
image

Before go the Debug, on the top, you see DEBUG, click on the engine.
image

Click on the Add Configuration and you see like this…
image

Select Cordova Run on Android…

Ok this configuration add in your project…

And become on the DEBUG and select this configuration…
image

Wait the VSCODE goes to build and send to you phone…

I hope this help!

:smiley:

unfortunately it doesn’t work with --watch flag.
I do have webstorm, but how do I solve the problem of not having an emulator installed?

Thank you!

As I live in iran and have no access to google developer tools , right now I just develop applications for web

but previously I used emulate android with Oracle Virtual Box , and or android studio emulator , and there is so many good and fast emulators out there

webstorm it self have noting to do with emulator but , he is so smart and help you as developer sooo much better than other IDEs

Thank you.
Unfortunately on my company laptop I have problems with all sort of emulators :confused:
will keep trying though because it is a pain like this!

Hi Starlley,
I have tried but couldn’t make it work :confused:
I admit I am no good with debugging tools either though so I might be doing something wrong.
Thanks for the suggestion I will try again!

So I actually read better this article, tried again

and it worked with

ionic cordova run android -l

I have no idea why it didn’t yesterday, but posting as solved in case it can help anyone else

1 Like

ionic cordova run android --device --livereload

1 Like