简体   繁体   English

ADB工具找不到Android设备

[英]Android Device not found by ADB tool

I want to deploy android app on device. 我想在设备上部署android应用。 But when run 'cordova run android --device' throws error as, 但是当运行'cordova run android --device'时抛出错误,

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 当我登记adb设备时,输出为

List of devices attached emulator-5554 device

I have enabled USB debugging on my android device. 我已在Android设备上启用USB调试。 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. 检查USB电缆。

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 请参阅,在您的错误跟踪中,它尝试在“设备上”安装apk:<-无效标识符

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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