phonegap本地运行android adb设备错误

时间:2014-02-26 15:16:03

标签: cordova

大家好我正在运行以下

M:\LocalDevelopment\PhoneGap\HelloWorldW>phonegap local build android
[phonegap] compiling Android...
[phonegap] successfully compiled Android app

运行正常但是,当我运行以下内容时出现错误

M:\LocalDevelopment\PhoneGap\HelloWorldW>phonegap local run android
[phonegap] compiling Android...
[phonegap] successfully compiled Android app
[phonegap] trying to install app onto device
[phonegap] no device was found
[phonegap] trying to install app onto emulator
   [error] An error occurred while emulating/deploying the android project.
M:\LocalDevelopment\PhoneGap\HelloWorldW\platforms\android\cordova\node_modules\q\q.js:126
            throw e;
              ^
Error executing "adb devices": 'adb' is not recognized as an internal or external command,

operable program or batch file.

我添加了这个

C:\Users\me\Downloads\adt-bundle-windows-x86_64-20131030\sdk\tools

作为环境变量,但仍然相同。

任何人都可以帮助或有其他方式来预览我创建的内容吗?

感谢

2 个答案:

答案 0 :(得分:4)

您的路径中可能没有platform-tools文件夹。

您的路径应包括:

C:\Users\me\Downloads\adt-bundle-windows-x86_64-20131030\sdk\platform-tools;C:\Users\me\Downloads\adt-bundle-windows-x86_64-20131030\sdk\tools

答案 1 :(得分:3)

我也遇到了这个问题。我已将路径设置正确,但在C:\ phonegap_project \ adt-bundle-windows-x86_64-20131030 \ sdk \ tools中缺少adb.exe文件。

下载adb​​.exe并放置上面的目录并打开cmd键入adb,如果你得到一些正确的信息。

下载链接 http://adbshell.com/download/download-adb-for-windows.html