ionic-cli: bug: ERR_NO_DEVICE: with cli 5.0.1

Bug Report

Ionic version:

[x] 4.x

Current behavior:

Ever since upgrading to ionic cli 5 running my ionic app on my Android device is nearly impossible as I consistantly get the error

[native-run] ERR_NO_DEVICE: No hardware devices found. Not attempting emulator because --device was specified.

I am not sure if this is a ‘native-run’ issue but since i need it to launch the app on the Android device I thought here was the more appropriate.

I have had to go back to cli 4. so I can launch the app.

Expected behavior:

for my app to launch natively

Steps to reproduce:

$ ionic cordova run android --device --livereload Related code:

insert short code snippets here

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 5.0.1 (/Users/user/.nvm/versions/node/v12.1.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.4.1

Cordova:

   Cordova CLI       : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms : android 7.1.4, ios 4.5.5
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 8 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.2

System:

   Android SDK Tools : 26.1.1 (/Users/user/Library/Android/sdk)
   ios-deploy        : 1.9.4
   NodeJS            : v12.1.0 (/Users/user/.nvm/versions/node/v12.1.0/bin/node)
   npm               : 6.9.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 23 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Oh, so it’s finding the device (bq Aquaris U2 Lite (API 25) UN045654), I assume that’s the target you wish to deploy to.

Could I also see the verbose logs for [native-run] when you try to use ionic cordova run android --device --livereload --verbose ?

Please also make sure you’re on the latest version of native-run, there’s been a few updates to both Android and iOS: npm i -g native-run@latest

Let me try those things. have tried. I updated to 0.2.3 and it still didn’t launch. Then without touching my phone or adjusting the cables or resetting the connection I did: $ ionic cordova run android --device --livereload --no-native-run and that worked. 🤔

also, Android Studio did detect the phone was connected.

👍 hopefully the native run will improve because it still works a lot better without using native run 🤷‍♂️

I was facing the same issue. Adding --no-native-run and downgrading platform-tools to version 28.0.2 did the trick.

Can you try updating to latest version of native-run? (0.2.3) Does it work if you use --no-native-run? (that should use the old way) Does Android Studio detect your device as connected?