question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ionic cordova run android --device` with connected device errors: "ERR_NO_DEVICE: No hardware devices found."

See original GitHub issue

Description: Once updated to Ionic 5.0.1, " ionic cordova run android --device" always got failed. See the error message in Output:

Steps to Reproduce: just Run ionic cordova run android --device

Output:

BUILD SUCCESSFUL in 6s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
        D:\dev\git\raveneyes\farmers\platforms\android\app\build\outputs\apk\debug\app-debug.apk
> native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-debug.apk --device
ERR_NO_DEVICE: No hardware devices found. Not attempting emulator because --device was specified.
[ERROR] An error occurred while running subprocess native-run.

        native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-d... exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

raven@raven-desk1 MINGW64 /d/dev/git/raveneyes/farmers (master)

My ionic info:

$ ionic info

Ionic:

   Ionic CLI                     : 5.0.1 (C:\Users\raven\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.3.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.4.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 16 other plugins)

Utility:

   cordova-res : 0.3.0
   native-run  : 0.2.2

System:

   Android SDK Tools : 26.1.1 (C:\Android\sdk)
   NodeJS            : v10.15.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 7

Other Information: Instead, "native-run android --app " does work!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
imhoffdcommented, Jun 10, 2019

Do you have a hardware device connected? What is the output of adb devices -l?

4reactions
winszencommented, Jun 12, 2019

Yes, also it worked for me without --device. Thank you all!

Read more comments on GitHub >

github_iconTop Results From Across the Web

no devices/emulators found when trying to use ionic cordova ...
1 Answer 1 · Enable Debug mode on your Android device. Also enable USB debug that is in the same configuration view. ·...
Read more >
SOLVED: Can't run app on android: device not found
run the command ionic run android --device; run adb devives (this shows: emulator-5554 device); added android:debuggable attribute to the ...
Read more >
Android Platform Guide - Apache Cordova
This guide shows how to set up your SDK environment to deploy Cordova apps for Android devices, and how to optionally use Android-centered...
Read more >
Chapter 4: Deploy to a Device | Learning Ionic | Softcover.io
Connect your device to your computer and run the following command. $ ionic cordova run android --device. 4.3 iOS Solution. The Ionic deployment...
Read more >
Ionic 6 Cordova | Create project - Run in device - YouTube
Ionic 6 Cordova | Create project - Run in device - Generate APK file | Complete guide for Beginners.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found