1

我剛剛將我的應用升級到了Sencha Touch 2.1,現在我正在嘗試構建它用於生產。不幸的是,我得到了以下錯誤消息:與Sencha命令生成錯誤

Sencha Cmd v3.0.0.250 
[DBG]  checking /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app for plugin.xml 
[DBG]  checking /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/workspace for plugin.xml 
[DBG]  checking /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250/plugins/touch/current for plugin.xml 
[DBG]  checking /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250 for plugin.xml 
[DBG]  located plugin /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app/plugin.xml 
[INF]  init-properties: 
[INF]  init-sencha-command: 
[INF]  init: 
[INF]  -before-app-build: 
[INF]  app-build-impl: 
[DBG]  found sencha.cfg at /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250 
[DBG]  found workspace at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/workspace 
[DBG]  found app at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app 
[DBG]  loading framework config from /Users/titouanvanbelle/Documents/workspace/app/sencha/touch 
[DBG]  found cmd at /Users/titouanvanbelle/Documents/workspace/app/sencha/touch/cmd 
[DBG]  Checking for framework config overrides 
[DBG]  resolving framework config overrides for 'touch' 
[DBG]  Detected framework version 2.1.0.447 
[DBG]  using framework config override '/Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250/plugins/touch/current' 
[INF]  production: 
[INF]  -before-init-local: 
[INF]  -init-local: 
[INF]  -after-init-local: 
[INF]  init-local: 
[INF]  find-cmd: 
[INF]  -before-init: 
[INF]  -init: 
[DBG]  Initialize Sencha Cmd with prefix = '' 
[DBG]  found sencha.cfg at /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250 
[DBG]  found workspace at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/workspace 
[DBG]  found app at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app 
[DBG]  loading framework config from /Users/titouanvanbelle/Documents/workspace/app/sencha/touch 
[DBG]  found cmd at /Users/titouanvanbelle/Documents/workspace/app/sencha/touch/cmd 
[DBG]  Checking for framework config overrides 
[DBG]  resolving framework config overrides for 'touch' 
[DBG]  Detected framework version 2.1.0.447 
[DBG]  using framework config override '/Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250/plugins/touch/current' 
[DBG]  adding /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250/sencha.jar to classpath 
[INF]  -after-init: 
[INF]  init: 
[INF]  -before-build: 
[INF]  sass: 
[INF]  -before-sass: 
[INF]  -sass: 
[INF]  [shellscript] identical ../css/app.css 
[INF]  -after-sass: 
[INF]  page: 
[INF]  -before-page: 
[INF]  -page: 
[INF]  building application 
[INF]  Deploying your application to /Users/titouanvanbelle/Documents/workspace/app/sencha/build/sencha/production 
[DBG]  copying all assets 
[DBG]  copying file /Users/titouanvanbelle/Documents/workspace/app/sencha/app.js 
[INF]  Copied app.js 
[DBG]  copying file /Users/titouanvanbelle/Documents/workspace/app/sencha/resources/css/app.css 
[INF]  Copied resources/css/app.css 
[DBG]  copying all extras 
[DBG]  copying from /Users/titouanvanbelle/Documents/workspace/app/sencha/resources/images to /Users/titouanvanbelle/Documents/workspace/app/sencha/build/sencha/production/resources/images 
[INF]  Copied /Users/titouanvanbelle/Documents/workspace/app/sencha/resources/images 
[DBG]  copying from /Users/titouanvanbelle/Documents/workspace/app/sencha/resources/icons to /Users/titouanvanbelle/Documents/workspace/app/sencha/build/sencha/production/resources/icons 
[INF]  Copied /Users/titouanvanbelle/Documents/workspace/app/sencha/resources/icons 
[DBG]  copying from /Users/titouanvanbelle/Documents/workspace/app/sencha/resources/startup to /Users/titouanvanbelle/Documents/workspace/app/sencha/build/sencha/production/resources/startup 
[INF]  Copied /Users/titouanvanbelle/Documents/workspace/app/sencha/resources/startup 
[INF]  Resolving your application dependencies (file:////Users/titouanvanbelle/Documents/workspace/app/sencha/index.html) 
[DBG]  found sencha.cfg at /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250 
[DBG]  found workspace at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/workspace 
[DBG]  found app at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app 
[DBG]  loading framework config from /Users/titouanvanbelle/Documents/workspace/app/sencha/touch 
[DBG]  found cmd at /Users/titouanvanbelle/Documents/workspace/app/sencha/touch/cmd 
[DBG]  Checking for framework config overrides 
[DBG]  resolving framework config overrides for 'touch' 
[DBG]  Detected framework version 2.1.0.447 
[DBG]  using framework config override '/Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250/plugins/touch/current' 
[INF]  Compiling app.js and dependencies 
[DBG]  running compiler with options : 'compile --ignore=src/locale,src/platform,auth2/Auth.js,scroller/Infinite.js --options=debug:false,logger:no,minVersion:3,product:touch union --recursive --file=app.js and concatenate -out=/Users/titouanvanbelle/Documents/workspace/app/sencha/build/sencha/production/app.js' 
[DBG]  found sencha.cfg at /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250 
[DBG]  found workspace at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/workspace 
[DBG]  found app at /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app 
[DBG]  loading framework config from /Users/titouanvanbelle/Documents/workspace/app/sencha/touch 
[DBG]  found cmd at /Users/titouanvanbelle/Documents/workspace/app/sencha/touch/cmd 
[DBG]  Checking for framework config overrides 
[DBG]  resolving framework config overrides for 'touch' 
[DBG]  Detected framework version 2.1.0.447 
[DBG]  using framework config override '/Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250/plugins/touch/current' 
[DBG]  java.lang.NoSuchMethodError 
[ERR]  BUILD FAILED 
[ERR]  com.sencha.exceptions.BasicException: The following error occurred while executing this line: 
[ERR]  /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NoSuchMethodError: org.mozilla.javascript.CompilerEnvirons.setRecordingComments(Z)V (<Unknown source>#461) in <Unknown source> at line number 461 
[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/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app/build-impl.xml:126: The following error occurred while executing this line: 
[ERR]  /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NoSuchMethodError: org.mozilla.javascript.CompilerEnvirons.setRecordingComments(Z)V (<Unknown source>#461) in <Unknown source> at line number 461 
[ERR]   at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551) 
[ERR]   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444) 
[ERR]   at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) 
[ERR]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) 
[ERR]   at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) 
[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: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]  Caused by: /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NoSuchMethodError: org.mozilla.javascript.CompilerEnvirons.setRecordingComments(Z)V (<Unknown source>#461) in <Unknown source> at line number 461 
[ERR]   at org.apache.tools.ant.util.ReflectUtil.toBuildException(ReflectUtil.java:183) 
[ERR]   at org.apache.tools.ant.util.ReflectUtil.throwBuildException(ReflectUtil.java:166) 
[ERR]   at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:110) 
[ERR]   at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81) 
[ERR]   at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103) 
[ERR]   at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67) 
[ERR]   at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350) 
[ERR]   at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50) 
[ERR]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) 
[ERR]   at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) 
[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.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) 
[ERR]   at org.apache.tools.ant.Project.executeTargets(Project.java:1251) 
[ERR]   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) 
[ERR]   ... 52 more 
[ERR]  Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NoSuchMethodError: org.mozilla.javascript.CompilerEnvirons.setRecordingComments(Z)V (<Unknown source>#461) in <Unknown source> at line number 461 
[ERR]   at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:156) 
[ERR]   at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:170) 
[ERR]   at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247) 
[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.util.ReflectUtil.invoke(ReflectUtil.java:108) 
[ERR]   ... 69 more 
[ERR]  Total time: 21 seconds 
[ERR]  com.sencha.exceptions.BasicException: The following error occurred while executing this line: 
/Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NoSuchMethodError: org.mozilla.javascript.CompilerEnvirons.setRecordingComments(Z)V (<Unknown source>#461) in <Unknown source> at line number 461 

我設法使V2兼容模式來編譯應用程序就像這裏解釋:

http://docs.sencha.com/touch/2-1/#!/guide/command_app-section-3

那麼可能是什麼原因,它不未啓用此模式編譯?

我剛剛瀏覽了我所有的觀點,並仔細檢查了要求聲明,他們都在那裏。此外,我不覆蓋我的應用程序中的任何組件。

更新

它編譯沒有在我的同事的MAC的一個錯誤。 我在山獅,這是我java -version

java version "1.6.0_37" 
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909) 
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) 

回答

4

它看起來像有是過時的版本

+0

我更新了下載最新版本的Rhino,現在它可以工作。非常感謝。 –

+0

你可以發表你是如何更新犀牛。我無法做到這一點:( – surhidamatya

0

這些錯誤是由錯誤解析相關性時引起的。你其實就是linked的解釋。確保您的需求/使用語句在每個地方都有定義。

新的Sencha Cmd編譯器默認用於確定 依賴關係。與以前的版本不同,編譯器通過處理源代碼(應用程序和框架)來確定 依賴關係。在 某些情況下,這可能會導致缺少依賴關係,即 在先前發行版中自動檢測到的依賴項,但編譯器未檢測到 。

在這種情況下,理想的解決方案是添加缺少的需求 語句來解決問題。這可能包括 切換覆蓋到新的命名形式,如:

Ext.define('MyApp.patches.foo.Bar', { 
    override: 'Ext.foo.Bar', 
    ... 
}); 

這使得覆蓋到他們的名字,因此編譯器處理它們以正確的順序是必需的。

如果需要推遲這種努力,可以啓用V2兼容性模式(基於通過無頭WebView內的文件系統協議 啓動應用程序以提取依賴關係)。

+0

就像我說的,我仔細檢查了每一個需要的聲明,他們都沒有失蹤。此外,我並沒有壓倒任何組件。我也忘記提到在同事的Mac上編輯作品。 –

3

它可以嘗試做一個青菜建立與應用程序版本(2.1確實,現在),你需要安裝爲它工作的指南針,但即使安裝它有時沒有。我發現最簡單的方法就是建立自己的青菜和補充一點:

skip.sass=1 

要觸摸\ CMD的sencha.cfg文件。

將其添加到第一部分的長虛線之前。

看看是否有幫助:)

+0

當Compass未安裝時,錯誤看起來更像這樣:http://stackoverflow.com/questions/13664736/sencha-cmd-3-0-0-250-build-error/13670208#13670208無論如何,我仍試過跳過sass,如果沒有v2deps標誌,它仍然不起作用。雖然 –

+0

這個解決方案對我有用 –

1

我正在煎茶觸摸2.1的系統環境變量指向(也許犀牛VERS),我有同樣的問題但安裝了指南針寶石,而它的工作原理,並沒有惹惱犀牛。

剛從命令行運行gem install compass。