如何将phonegap应用程序直接部署到设备

时间:2014-01-14 22:14:58

标签: android deployment cordova windows-8

我有一个Phonegap 3.3.0项目设置和完美工作,我可以从cmd的patd构建一个.APK:

jamie@Hutber-8 /c/var/www/sexdiaries.co.uk/sdapp/app
  $ phonegap build android
    [phonegap] detecting Android SDK environment...
    [phonegap] using the local environment
    [phonegap] compiling Android...
    [phonegap] successfully compiled Android app

我的手机已插入,它的连接5似乎与Windows 8有问题,但我相信它的工作正常:

$ adb devices
List of devices attached
029188d8e0784684        device

但是,当我尝试部署到此设备时:

$ phonegap install android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[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.
events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:980:11)

我查看了文档,但似乎无法找到有关此内容的详细信息......

1 个答案:

答案 0 :(得分:3)

事实证明,一切都运行正常,唯一的问题是我以前安装了应用程序,名称相同但签名不同。

简单地说,卸载相同的应用程序或以前安装的应用程序,然后此命令将起作用:

phonegap run android