ionic-team / ionic-team/ionic-cli

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

Aberta
#3,358 1 comentário 0 reações 0 responsáveis Ver no GitHub
triage
Linguagem predominante
TypeScript
Estrelas
2k
Forks
682
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

**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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by reproducing `ionic cordova run android --target=420069009bdc7200` after confirming the device with `adb devices`, then trace the CLI's Android target-resolution entry point. Done means an attached device ID is accepted and the project launches, or the command reports a clear actionable error; the issue names no source file or test to run.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
android, node.js, typescript
Domínio
cli, mobile-dev
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
28/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.