SOLVED: Can't run app on android: device not found

SOLUTION: the only thing I forgot was going to developer options and enabling USB debugging itself (thought I did that several weeks ago already but it wasn’t enabled).

I tried running my app on an android galaxy S4. Running on iOS works fine, and the android emulator works as well. I’m having trouble getting the app to run on an actual android devices

What I did:

  • enable usb debugging on the android devices (tapping the build number 7 times)
  • run the command ionic run android --device
  • run adb devives (this shows: emulator-5554 device)
  • added android:debuggable attribute to the manifest file
  • when I plug in the device, android file transfer pops up with my folders on the device, so it’s definitely connected

I’m using a mac.

Thanks for helping out!

This is the output I get:

**ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: ERROR: Failed to deploy to device, no devices found.**
    
    droid/cordova/run: Command failed with exit code 8
        at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:126:23)
        at ChildProcess.EventEmitter.emit (events.js:98:17)
        at maybeClose (child_process.js:743:16)
        at Process.ChildProcess._handle.onexit (child_process.js:810:5)

Hi,
How did you solve this trouble, I have the same trying to run on Nexus, I use have a mac also.

Thanks

1 Like

I use nexus + mac too
enable debugging mode on nexus
cmd: ionic run android --device
try to disconnect and connect usb again if it still can’t find device
Hope this help!

I have had problem that I have got “device not found” after first working connection an next reconnection. I have found solution by closing chrome://inspect/#devices tam in chrome dev tools. Hope this help someone. Happy coding!

Credit: https://stackoverflow.com/a/36662403/861615

4 Likes

This is what helped me

ionic cordova run android -l -c --native-run

ionic info

Ionic:

   Ionic CLI          : 5.0.2 (C:\Users\Pavlo\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.4-201903121725
   @ionic/app-scripts : 3.2.3

Cordova:

   Cordova CLI       : 8.0.0
   Cordova Platforms : android 7.0.0
   Cordova Plugins   : cordova-plugin-ionic 5.0.3, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.4.1, (and 24 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.5

System:

   Android SDK Tools : 26.1.1 (C:\Users\Pavlo\AppData\Local\Android\Sdk)
   NodeJS            : v10.15.0 (C:\MyPrograms\nodejs\node.exe)
   npm               : 6.4.1
   OS                : Windows 10

Old issue, but it still happens. In my case, it was a faulty USB-C cable. The cable worked fine to charge the Android device connected to my Mac, but the device wasn’t recognized until I swapped out the cable.