ionic-team / ionic-team/ionic-cli
`ionic capacitor run android` does not allow selection of device, then crashes
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2k
- Forks
- 682
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**Description:**
After updating to Capacitor 3 `ionic capacitor run android` now attempts to directly launch the App on a device instead of simply opening Android Studio. The device selection fails.
First `? Which device would you like to target? (Use arrow keys)` is shown. If any arrow key is pressed, the `(Use arrow keys)` text disappears. Pressing enter produces the output
> `TypeError: Cannot read property 'value' of undefined`
and nothing further happens.
**Steps to Reproduce:**
- Run `ionic capacitor run android` in a Capacitor 3 project.
**Output:**
```
xxx@xxx:~/XXXXXXXX$ ionic capacitor run android --verbose
ionic:lib Terminal info: { ci: false, shell: '/bin/bash', tty: true, windows: false } +0ms
ionic:lib CLI global options: { _: [ 'capacitor', 'run', 'android' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, '--': [] } +2ms
ionic:lib:project Project type from config: @ionic/angular (angular) +0ms
ionic:lib:project Project details: { context: 'app', type: 'angular', errors: [], configPath: '/home/xxx/xxx/ionic.config.json' } +0ms
ionic Context: { binPath: '/home/xxx/.nvm/versions/node/v14.17.0/lib/node_modules/@ionic/cli/bin/ionic', libPath: '/home/xxx/.nvm/versions/node/v14.17.0/lib/node_modules/@ionic/cli', execPath: '/home/xxx/xxx/xxx/xxx', version: '6.16.3' } +0ms
ionic:lib:integrations:capacitor Getting config with Capacitor CLI: [ 'config', '--json' ] +0ms
ionic:lib:integrations:capacitor Could not get config from Capacitor CLI (probably old version) +267ms
ionic:commands:capacitor:run Getting native targets for 'android' with Capacitor CLI: [ 'run', 'android', '--list', '--json' ] +0ms
? Which device would you like to target?
TypeError: Cannot read property 'value' of undefined
```
**My `ionic info`:**
```
Ionic:
Ionic CLI : 6.16.3 (/home/xxx/.nvm/versions/node/v14.17.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.6.6
@angular-devkit/build-angular : 0.1102.11
@angular-devkit/schematics : 11.2.11
@angular/cli : 11.2.11
@ionic/angular-toolkit : 3.1.1
Capacitor:
Capacitor CLI : 3.1.1
@capacitor/android : 3.1.1
@capacitor/core : 3.1.1
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 1.4.0
System:
NodeJS : v14.17.0 (/home/xxx/.nvm/versions/node/v14.17.0/bin/node)
npm : 6.14.13
OS : Linux 5.4
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.