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
CodePudding user response:
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
- Choose the device to deploy app. If your device is connected to pc then select the your device name else select from the list of emulators
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
- Choose the device to deploy app. If your device is connected to pc then select the your device name else select from the list of simulators
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.