【问题标题】:Unable to resolve Phone Gap [error] cmd: Command failed with exit code ENOENT 3无法解决电话间隙 [错误] cmd:命令失败,退出代码为 ENOENT 3
【发布时间】:2014-03-25 05:44:55
【问题描述】:

无法在 android 中运行 sencha/phonegap 应用程序.. 出现异常“cmd:命令失败,退出代码 ENOENT 3”这是我安装的版本..

D:\testapp>sencha -version   
Sencha Cmd v4.0.1.45
[ERR] No such property : version
 at com.sencha.cli.AbstractCommand$Properties.getProperty(AbstractCommand.ja
va:417)
 at com.sencha.cli.AbstractCommand.parseConfigParam(AbstractCommand.java:441
)
 at com.sencha.cli.AbstractCommand.processConfigParam(AbstractCommand.java:4
91)
 at com.sencha.cli.AbstractCommand.configure(AbstractCommand.java:114)
 at com.sencha.command.Sencha.main(Sencha.java:136)


D:\testapp>phonegap -version  
3.4.0-0.19.7

D:\testapp>cordova -version  
3.4.0-0.1.3

D:\testapp>ant -version  
Apache Ant(TM) version 1.9.3 compiled on December 23 2013

D:\testapp>phonegap run android  
[phonegap] detecting Android SDK environment...  
[phonegap] using the local environment  
[phonegap] adding the Android platform...  
[error] cmd: Command failed with exit code ENOENT  

D:\testapp>phonegap build android  
[phonegap] detecting Android SDK environment...  
[phonegap] using the local environment  
[phonegap] adding the Android platform...   
[error] cmd: Command failed with exit code ENOENT  

Thanks in advance

【问题讨论】:

标签: android cordova ant sencha-touch-2


【解决方案1】:

检查以下步骤:

  1. cordova create testapp com.example.testapp TestApp

  2. cd testapp

  3. cordova platform add android

  4. cordova build android

在此之后,您应该复制您的项目并将其粘贴到您的 cordova 项目的直接 www 文件夹中。然后运行

  1. cordova run android

从上面的 sn-p 看来,您的系统中安装了 cordova。 注意:以上 CLI 步骤适用于 cordova 版本 3.x

【讨论】:

  • D:\Cordova_ex>cordova create hello com.example.testapp TestApp 在位置“D:\Cordova_ex\hello”创建一个名为“TestApp”、ID 为“com.example.testapp”的新cordova项目" D:\Cordova_ex>cd hello D:\Cordova_ex\hello>cordova platform add android Creating android project... Error: cmd: Command failed with exit code ENOENT
  • 我已经编辑了我的答案。有一个错误。再试一次。
  • 还是一样,D:\Cordova_ex>cordova create testapp com.example.testapp TestApp 在位置“D: \Cordova_ex\testapp" D:\Cordova_ex>cd testapp D:\Cordova_ex\testapp>cordova platform add android Creating android project... 错误:cmd:命令失败,退出代码 ENOENT 在 ChildProcess.whenDone (C:\Users\sharana .bv\AppData\Roaming\npm\node_modul es\cordova\src\superspawn.js:112:23) 在 ChildProcess.EventEmitter.emit (events.js:95:17) 在 Process.ChildProcess._handle.onexit (child_process. js:795:12)
  • 我猜你检查你的 java PATH 变量。
  • 这里是我的路径变量C:\Program Files\SenchaCmd\Sencha\Cmd\4.0.1.45; C:\Ruby193\bin; C:\Program Files\Java\jdk1.7.0_25\bin; C:\Program Files\SlikSvn\bin; E:\adt-bundle-windows-x86-20130717\adt-bundle-windows-x86-20130717\sdk\tools; E:\adt-bundle-windows-x86-20130717\adt-bundle-windows-x86-20130717\sdk\platform-tools; C:\Program Files\TortoiseHg\; C:\Program Files\VisualSVN 服务器\bin; C:\sencha-touch-2.3.1-gpl\touch-2.3.1; %ANT_HOME%\bin; C:\Users\....\AppData\Roaming\npm; C:\Users\....\AppData\Roaming\npm\node_modules\phonegap\bin; C:\Windows\System32\wbem; C:\Program Files\nodejs\
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-12
  • 1970-01-01
  • 1970-01-01
  • 2017-04-03
相关资源
最近更新 更多