Sencha cmd 构建错误:shellscript 返回:1

Posted

技术标签:

【中文标题】Sencha cmd 构建错误:shellscript 返回:1【英文标题】:Sencha cmd build error: shellscript returned: 1 【发布时间】:2015-07-13 19:48:53 【问题描述】:

我正在处理一个预先存在的 Sencha Touch 项目。我无法构建它,并且不确定应该如何调试 Sencha cmd 构建问题。任何有关此特定错误的帮助或有关如何设置 Sencha 构建环境的提示都将不胜感激。

这是错误信息的sn-p:

[ERR] The following error occurred while executing this line:
/Users/foo/bartech/bartech2go-new/.sencha/app/build-impl.xml:437: The following error occurred while executing this line:
/Users/foo/bartech/bartech2go-new/.sencha/app/packager-impl.xml:17: The following error occurred while executing this line:
/Users/foo/bartech/bartech2go-new/.sencha/app/cordova-impl.xml:109: The following error occurred while executing this line:
jar:file:/Users/foo/luggage/bin/Sencha/Cmd/6.0.0.202/sencha.jar!/com/sencha/ant/antlib.xml:680: shellscript returned: 1
     at com.sencha.exceptions.BasicException.wrap(BasicException.java:54)
     at com.sencha.ant.AntScript.execute(AntScript.java:120)
     at com.sencha.command.plugin.PluginManager.execute(PluginManager.java:104)
     at com.sencha.command.plugin.PluginManager.executeReverseFirst(PluginManager.java:145)
     at com.sencha.command.environment.BuildEnvironment.execute(BuildEnvironment.java:280)
     at com.sencha.command.environment.AppOrPackageEnvironment.execute(AppOrPackageEnvironment.java:738)
     at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97)
     at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:346)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:175)
     at com.sencha.cli.Command.dispatch(Command.java:43)
     at com.sencha.command.BasePluginCommands$BasePluginCommand.dispatch(BasePluginCommands.java:201)
     at com.sencha.cli.Commands.dispatch(Commands.java:64)
     at com.sencha.cli.Commands.dispatch(Commands.java:64)
     at com.sencha.command.Sencha.dispatch(Sencha.java:73)
     at com.sencha.command.Sencha.main(Sencha.java:141)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
     at com.install4j.runtime.launcher.UnixLauncher.main(Unknown Source)
   Caused by: The following error occurred while executing this line:
/Users/foo/bartech/bartech2go-new/.sencha/app/build-impl.xml:437: The following error occurred while executing this line:
/Users/foo/bartech/bartech2go-new/.sencha/app/packager-impl.xml:17: The following error occurred while executing this line:
/Users/foo/bartech/bartech2go-new/.sencha/app/cordova-impl.xml:109: The following error occurred while executing this line:
jar:file:/Users/foo/luggage/bin/Sencha/Cmd/6.0.0.202/sencha.jar!/com/sencha/ant/antlib.xml:680: shellscript returned: 1
     at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     at org.apache.tools.ant.Task.perform(Task.java:348)
     at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
     at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:217)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     at org.apache.tools.ant.Task.perform(Task.java:348)
     at org.apache.tools.ant.Target.execute(Target.java:392)
     at org.apache.tools.ant.Target.performTasks(Target.java:413)
     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
     at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
     at com.sencha.ant.AntScript.execute(AntScript.java:116)
     at com.sencha.command.plugin.PluginManager.execute(PluginManager.java:104)
     at com.sencha.command.plugin.PluginManager.executeReverseFirst(PluginManager.java:145)
     at com.sencha.command.environment.BuildEnvironment.execute(BuildEnvironment.java:280)
     at com.sencha.command.environment.AppOrPackageEnvironment.execute(AppOrPackageEnvironment.java:738)
     at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97)
     at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:346)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:175)
     at com.sencha.cli.Command.dispatch(Command.java:43)
     at com.sencha.command.BasePluginCommands$BasePluginCommand.dispatch(BasePluginCommands.java:201)
     at com.sencha.cli.Commands.dispatch(Commands.java:64)
     at com.sencha.cli.Commands.dispatch(Commands.java:64)
     at com.sencha.command.Sencha.dispatch(Sencha.java:73)
     at com.sencha.command.Sencha.main(Sencha.java:141)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
     at com.install4j.runtime.launcher.UnixLauncher.main(Unknown Source)

我正在运行 Mac OS X 10.10.4。以下是 Sencha Cmd 的版本号及其一些依赖项:

Sencha Cmd v6.0.0.202

ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

Compass 1.0.3 (Polaris)

cordova 5.1.1

我不确定我运行的是哪个版本的 Sencha Touch。以下是一些很有帮助的价值观:

.sencha/app/sencha.cfg: app.cmd.version=6.0.0.202

.sencha/workspace/sencha.cfg: workspace.cmd.version=5.0.3.324

touch/cmd/sencha.cfg: framework.cmd.version=4.0.5.87

这是完整的构建日志:https://gist.githubusercontent.com/jkndrkn/5fbecd12c3875649687f/raw/sencha-cmd-build-log

【问题讨论】:

【参考方案1】:

发生的错误与cordova ios平台文件有关。

我发现从cordova文件夹中运行cordova platform remove platform,然后重新添加平台是有效的。 (重新添加,cordova platform add platform

【讨论】:

您部分正确。我的项目几乎丢失了所有的科尔多瓦文件!最初的项目开发人员提交了它,现在构建似乎正在工作。我会将您的答案标记为正确的答案,因为它让我了解到科尔多瓦存在问题。

以上是关于Sencha cmd 构建错误:shellscript 返回:1的主要内容,如果未能解决你的问题,请参考以下文章

为啥 Sencha Touch cmd 中没有视图构建

Sencha Cmd 5 + Java 8 错误

EXTJS - 动态包加载 Sencha Cmd 7.4

无法使用 Sencha Cmd 3.1.1.274 构建 Sencha Touch 2.1 应用程序

Sencha Cmd 损坏:为啥“应用程序构建”会忽略任何命令行参数?

Sencha CMD 构建过程应用于现有的 ExtJs 4.1 应用程序