简体   繁体   中英

Android Device not found by ADB tool

I want to deploy android app on device. But when run 'cordova run android --device' throws error as,

ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: ERROR: Failed to deploy to device, no devices found. Error: /home/inkilab/golang/src/github.com/okpatil4u/android/platforms/android/cordova/run: Command failed with exit code 8 at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:756:16) at Process.ChildProcess._handle.onexit (child_process.js:823:5)

When I enlist adb devices output is as

List of devices attached emulator-5554 device

I have enabled USB debugging on my android device. So, what is the problem now?

it looks like you have connected only emulator. please connect or disconnect the device and you should confirm security question. Check usb cable.

You have to pass your device identifier in your command line like this :

cordova run android --device=emulator-5554

See, in your error trace, it try to install apk on the 'device :' <- void identifier

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM