How to deploy phonegap app directly to device

白昼怎懂夜的黑 提交于 2019-12-09 18:32:07

问题


I have a Phonegap 3.3.0 project set up and working perfectly as much as that I can build an .APK from the cmd at pat:

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

I have my Phone plugged in, its a nexus 5 which seems to have problems with windows 8, but I believe its working correctly:

$ adb devices
List of devices attached
029188d8e0784684        device

However when I try to deploy to this 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)

I've looked through the documentation but can't seem to find details on this...


回答1:


It turned out that everything was running correctly, the only problem was that I had previously installed the app, under the same name but signed different.

Put simply, uninstall the same app, or previously installed app and then this command will work:

phonegap run android



来源:https://stackoverflow.com/questions/21125131/how-to-deploy-phonegap-app-directly-to-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!