Reputation:
I have ionic capacitor project and I am trying to run it on device. Need help for android livereload debugging as i am using windows machine
Upvotes: 1
Views: 16446
Reputation: 1
ionic cap run -l --external
It will ask for platform to select
Upvotes: 0
Reputation: 196
Important hint: Make sure that you do not have any eslint errors or warnings when running the command ionic cap run android --external -livereload
, otherwise it will not perform the bundle build and it will not deploy the app to your selected device. I've spent hours to figure that out.
Upvotes: 2
Reputation: 350
Making sure that we have already setup jdk and android studio. We give following commands:
For android :
ionic cap add android
ionic cap sync
ionic cap build android
ionic cap run android --external -livereload
The compiled android project might open on android studio for generating apk build. Even then you can hit run button to see the app on device.
For ios:
ionic cap add ios
ionic cap sync
ionic cap build ios
ionic cap run ios --external -livereload
The compiled ios project might open on xcode studio for generating ipa build. Even then you can select simulator to see the app on device.
NOTE: All commands with respect to ionic 5 and above.
Upvotes: 12