ionic-framework
ionic-framework copied to clipboard
bug: ionic cap run android -l opens android studio and fails to target the emulator. Same happens with iOS (x-code)
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- [ ] v4.x
- [X] v5.x
- [ ] v6.x
- [ ] Nightly
Current Behavior
I cannot for the life of me figure out why my colleague cannot get live reload working on android or ios. I have had it working on android but trying to setup someone new has proven painful.
Running ionic cap run android -l --external
simply opens up android studio or x-code and does not target the emulator/simulator.
I have also tried ionic cap run ios --livereload --external --host=0.0.0.0
Running ionic cap ios --list
does not list anything, it simply builds the project again and opens x-code
Expected Behavior
Running this command should target the emulator and open the app in the emulator and reload once a change is made.
Running ionic cap ios --list
should show available emulators
Steps to Reproduce
Create an environment with similar as my ionic info
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 5.4.16 (C:\Users\user\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.6.0
@angular-devkit/build-angular : 0.1102.19
@angular-devkit/schematics : 11.2.19
@angular/cli : 11.2.19
@ionic/angular-toolkit : 3.1.1
Capacitor:
Capacitor CLI : 3.5.0
@capacitor/core : 3.5.0
Cordova:
Cordova CLI : not installed
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res : not installed
native-run : 1.5.0
System:
NodeJS : v16.14.0 (C:\Program Files\nodejs\node.exe)
npm : 8.3.1
OS : Windows 10
Additional Information
No response
Thanks for the issue. Ionic Framework manages the UI layer of your app and does not manage the native dependencies of your application. As a result, it is unlikely that this error is coming from Ionic Framework.
This could be an issue with the Ionic CLI or Capacitor, however I do notice that the Ionic CLI you have installed is very outdated. Can you try this again using the latest version of the Ionic CLI?
npm uninstall -g ionic
npm install -g @ionic/cli
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!