我正在尝试使用 Sencha cmd 构建现有的基于 Sencha 的应用程序。但是由于显示以下错误消息,构建失败。我通过创建一个示例测试了 Sencha cmd,新应用程序运行良好并成功构建,但问题出在现有应用程序上。
Alens-Mac-mini:SenchaApp Projects$ sencha app build package
Sencha Cmd v3.0.0.250
[INF] init-properties:
[INF] init-sencha-command:
[INF] init:
[INF] -before-app-build:
[INF] app-build-impl:
[INF] package:
[INF] -before-init-local:
[INF] -init-local:
[INF] -after-init-local:
[INF] init-local:
[INF] find-cmd:
[INF] -before-init:
[INF] -init:
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Problem: failed to create task or type x-verify-app-cmd-ver
[ERR] Cause: The name is undefined.
[ERR] Action: Check the spelling.
[ERR] Action: Check that any custom tasks/types have been declared.
[ERR] Action: Check that any <presetdef>/<macrodef> declarations have taken place.
[ERR] at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:182)
[ERR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:58)
[ERR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:22)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:87)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:91)
[ERR] at com.sencha.command.BasePluginCommands $BaseNamePathCommand.run(BasePluginCommands.java:135)
[ERR] at com.sencha.command.app.AppCommands $BuildCommand.execute(AppCommands.java:106)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR] Caused by: /Users/Alens/Desktop/SenchaApp/.sencha/app/build-impl.xml:91: Problem: failed to create task or type x-verify-app-cmd-ver
[ERR] Cause: The name is undefined.
[ERR] Action: Check the spelling.
[ERR] Action: Check that any custom tasks/types have been declared.
[ERR] Action: Check that any <presetdef>/<macrodef> declarations have taken place.
[ERR] at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:487)
[ERR] at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:419)
[ERR] at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:347)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR] at com.sencha.command.ant.AntCommand.execute(AntCommand.java:75)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] ... 31 more
[ERR] Total time: 3 seconds
[ERR] com.sencha.exceptions.BasicException: Problem: failed to create task or type x- verify-app-cmd-ver
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.