Cordova和PhoneGap初始化失败在Sencha命令 [英] Cordova and PhoneGap initialization failed on Sencha Command
本文介绍了Cordova和PhoneGap初始化失败在Sencha命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Ubuntu 13.10上通过NodeJS CLI安装了PhoneGap,并开始了本机构建过程。但是,在初始化期间,这是已执行的命令和相应的输出。
I had installed PhoneGap through NodeJS CLI on my Ubuntu 13.10 and started native build process. However, during the initialization, this was the executed command and the respective output.
$ sencha phonegap init com.foo.barapp BarApp
Sencha Cmd v4.0.2.67
[INF]
[INF] sencha-phonegap-init:
[INF]
[INF] init-phonegap:
[INF] [echo] Adding PhoneGap to Application
[INF] [echo] Adding PhoneGap template files
[INF] [echo] Adding Native properties
[INF] [x-property-file] Updating property file: /tmp/BarApp/.sencha/app/native.properties
[INF] [x-property-file] Updating property file: /tmp/BarApp/.sencha/app/build.properties
[INF] [echo] Patching build.xml for PhoneGap Support
[INF] [echo] Building PhoneGap App
[ERR] The following error occurred while executing this line:
/opt/sencha/cmd/4.0.2.67/extensions/cmd-phonegap-packager/cmd-phonegap-packager.plugin.xml:131: The following error occurred while executing this line:
jar:file:/opt/sencha/cmd/4.0.2.67/sencha.jar!/com/sencha/ant/antlib.xml:608: shellscript returned: 1
推荐答案
我发现的解决方案是重新定义在phonegap.js中设置的env值:
The solution I found was redefine the env value set in phonegap.js:
$ git diff phonegap.js
$ diff --git a/lib/node_modules/phonegap/bin/phonegap.js b/lib/node_modules/phonegap/bin/phonegap.js
index b6e469b..e1eb83f 100755
--- a/lib/node_modules/phonegap/bin/phonegap.js
+++ b/lib/node_modules/phonegap/bin/phonegap.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env node
+#!/usr/bin/env nodejs
/*!
* Module dependencies.eplace the interpreted value set at phonegap.js file.
同样可以做Cordova脚本。
The same can be done to Cordova script.
这篇关于Cordova和PhoneGap初始化失败在Sencha命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文