ionic-team / ionic-team/ionic-cli

Target 'device-id' not found, unable to run project

Abierto
#3,358 1 comentario 0 reacciones 0 asignados Ver en GitHub
triage
Lenguaje dominante
TypeScript
Estrellas
2k
Forks
682
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Description:**
I have created an ionic application, I want to test it on android phone v5.1.1,
when I run 'adb devices' shows me
```
$ adb devices
List of devices attached
420069009bdc7200 device
```
but when
I run the command 'ionic cordova run android --target=420069009bdc7200',
it gives me following error
```
BUILD SUCCESSFUL in 4s
....
........
(node:5184) UnhandledPromiseRejectionWarning: Target '420069009bdc7200' not found, unable to run project
.........
.....
```
**Steps to Reproduce:**
ionic cordova run android --target=device-id

**Output:**
UnhandledPromiseRejectionWarning: Target '420069009bdc7200' not found, unable to run project

**My `ionic info`:**
```
cli packages: (C:\Users\developer.web\Desktop\app\nawrooz\nawrooz-v1\node_modules)

@ionic/cli-plugin-proxy : 1.5.8
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms : android 7.0.0 browser 5.0.3
Ionic Framework : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node : v8.11.2
npm : 5.6.0
OS : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\developer.web\AppData\Local\Android\Sdk
HTTP_PROXY : not set
http_proxy : not set
HTTPS_PROXY : not set
https_proxy : not set
IONIC_HTTP_PROXY : not set
PROXY : not set
proxy : not set

Misc:

backend : pro

```
**My `cordova info`:**
```
Node version: v8.11.2

Cordova version: 8.0.0

Config.xml file:

MyApp
An awesome Ionic/Cordova app.
Ionic Framework Team

























































































Plugins:

cordova-plugin-advanced-http,cordova-plugin-device,cordova-plugin-file,cordova-plugin-googleplus,cordova-plugin-ionic-keyboard,cordova-plugin-ionic-webview,cordova-plugin-secure-storage,cordova-plugin-splashscreen,cordova-plugin-statusbar,cordova-plugin-whitelist,cordova-plugin-x-socialsharing,cordova-sms-plugin,es6-promise-plugin,mx.ferreyra.callnumber

Android platform:

**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************

Invoking "C:\Users\developer.web\AppData\Local\Android\Sdk\tools\bin\avdmanager" list target

Available Android targets:==============] 100% Fetch remote repository...
----------
id: 1 or "android-22"
Name: Android API 22
Type: Platform
API level: 22
Revision: 2
----------
id: 2 or "android-26"
Name: Android API 26
Type: Platform
API level: 26
Revision: 2
----------
id: 3 or "android-28"
Name: Android API 28
Type: Platform
API level: 28
Revision: 4

```

**Other Information:**
I searched a lot but I couldn't find a solution.
please help someone

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.