ADB工具找不到Android设备

时间:2015-12-30 09:28:47

标签: android cordova

我想在设备上部署Android应用。但是当运行&#cord; cordova运行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)

当我登记adb设备时输出为

List of devices attached emulator-5554 device

我在Android设备上启用了USB调试功能。那么,现在的问题是什么?

2 个答案:

答案 0 :(得分:0)

看起来你只连接了模拟器。 请连接或断开设备,您应该确认安全问题。 检查USB电缆。

答案 1 :(得分:0)

您必须在命令行中传递设备标识符,如下所示:

cordova run android --device=emulator-5554

请参阅错误跟踪,尝试在设备上安装apk:' < - void identifier