2014-06-17 116 views
2

您好我正在學習和開始使用ExtJS(from here)。但似乎我錯過了某些東西,或者在這裏遇到了一些問題。每當我試圖執行第一個基本簡單的命令:sencha generate app -ext Myapp ./app它的失敗,以下情況除外:Sencha Cmd不生成ExtJS應用程序

Sencha Cmd v5.0.0.160 
[ERR] java.lang.NullPointerException 
at javax.xml.bind.DatatypeConverter.printBase64Binary(DatatypeConverter.java:547) 
at com.sencha.util.StringUtil.toBase64(StringUtil.java:202) 
at com.sencha.tools.generator.DataStoreImpl.get(DataStoreImpl.java:103) 
at com.sencha.tools.generator.Generator$1.doMerge(Generator.java:464) 
at com.sencha.tools.generator.Generator$Mode$3.dispatch(Generator.java:269) 
at com.sencha.tools.generator.Generator.generateFileToFile(Generator.java:449) 
at com.sencha.tools.generator.Generator.generateFileToDir(Generator.java:441) 
at com.sencha.tools.generator.Generator.generateDirToDir(Generator.java:434) 
at com.sencha.tools.generator.Generator.generateDirToDir(Generator.java:429) 
at com.sencha.tools.generator.Generator.generate(Generator.java:148) 
at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:130) 
at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:184) 
at com.sencha.command.environment.WorkspaceRepository.getLocalRepository(WorkspaceRepository.java:274) 
at com.sencha.command.environment.FrameworkEnvironment.loadFrameworkPackage(FrameworkEnvironment.java:180) 
at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.getParameters(GeneratorCommands.java:146) 
at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:26) 
at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.execute(GeneratorCommands.java:116) 
at com.sencha.command.generator.GeneratorCommands$AppCommand.generateWorkspace(GeneratorCommands.java:468) 
at com.sencha.command.generator.GeneratorCommands$AppCommand.execute(GeneratorCommands.java:313) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:175) 
at com.sencha.cli.Command.dispatch(Command.java:43) 
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:71) 
at com.sencha.command.Sencha.main(Sencha.java:139) 

當我試圖執行sencha generate app MyApp ./app是拋出異常如下:

Sencha Cmd v5.0.0.160 
[ERR] Unable to locate 'framework.dir' property from sencha.cfg and no framework directory specified 
[ERR] Please ensure this command was executed from a valid framework directory 
[ERR] No Framework specified 

什麼是framework.dir這裏? 我已經下載了Sencha ExtJS v5.0.0以及,我是否需要將它保存在某個地方?

更新
運行sencha -sdk /path/to/extjs-5.0.0 generate app MyApp ./app給予同樣的結果,說回購後沒有正確初始化。

我已經安裝了Ruby v1.9.3和Sencha Cmd v5.0.0.160,您可以在上面的例外中看到。任何想法如何解決這個問題?

回答

1

您必須從安裝了ext的目錄運行Sencha Cmd,或者您必須爲其提供安裝Ext的路徑。

這應該工作:

sencha -sdk /path/to/ext/ generate app MyApp /where/you/want/the/app 
+0

感謝您的答覆,我這樣做,但沒有幫助 – agpt

+0

東西很奇怪,我沒有別的選擇,不是硬復位/格式我的臺式機! ! :(**後,一切工作順利.. !! **如果任何人知道確切的根本原因,請分享它 – agpt

1

爲了避免任何混亂只是通過「煎茶CMD」,「煎茶SDK」和您所需的應用程序目標目錄的完整路徑。

/Users/vishnu/bin/Sencha/Cmd/5.1.0.26/sencha -sdk /Users/vishnu/Documents/senchaworkspace/ext-5.0.1 generate app TutorialApp /Users/vishnu/Documents/senchaworkspace/TutorialApp 

這完全適用於我

+0

是的你是對的。我的機器有一些奇怪的問題,我不得不重置它在爲了得到它正常工作。 – agpt

相關問題