gpt4 book ai didi

node.js - Sencha 命令上的 Cordova 和 PhoneGap 初始化失败

转载 作者:太空宇宙 更新时间:2023-11-03 22:01:33 25 4
gpt4 key购买 nike

我已经通过 NodeJS CLI 在我的 Ubuntu 13.10 上安装了 PhoneGap 并开始了 native 构建过程。然而,在初始化期间,这是执行的命令和相应的输出。

    $ 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

Cordova 也发生了同样的问题。

最佳答案

我找到的解决方案是重新定义phonegap.js中设置的env值:

    $ 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 脚本也可以进行同样的操作。

关于node.js - Sencha 命令上的 Cordova 和 PhoneGap 初始化失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22272569/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com