简体   繁体   English

Sencha Cmd无法从sencha.cfg找到'app.dir'配置属性

[英]Sencha Cmd Unable to locate 'app.dir' config property from sencha.cfg

I have built a sencha touch app using Sencha touch 2.1.0 and now I am trying to build it using instructions provided here : http://cclerville.blogspot.in/2013/01/sencha-touch-21-phonegap-220-android_3.html 我使用Sencha touch 2.1.0构建了一个sencha touch应用程序,现在我正在尝试使用此处提供的说明构建它: http//cclerville.blogspot.in/2013/01/sencha-touch-21-phonegap-220- android_3.html

but the build is failing with this error message, can someone help me out? 但是这个错误消息的构建失败了,有人可以帮助我吗?

$ sencha app build package && build/myshop/android/cordova/build
Sencha Cmd v3.0.2.288
[ERR]       Please ensure this command was executed from a valid application directory
[ERR]       Unable to locate 'app.dir' config property from sencha.cfg

sencha.cfg inside my sencha Cmd directory has these entries: 我的sencha Cmd目录中的sencha.cfg包含以下条目:

framework.name=touch
framework.version=2.1.0.447
framework.classpath=${framework.dir}/src
# This is the minimum required Sencha Cmd version:
framework.cmd.minver=3.0.0.141
# This is the current version of the Sencha Cmd at the time of this SDK release:
framework.cmd.version=3.0.0.250

Its been long wait for answer so it seems like incompatibility issue to me because I have generated the app using sencha-touch 2.1.0 and its has sencha.cfg at /touch/cmd/sencha.cfg instead of /.sencha/app/sencha.cfg in 2.1.1 apps and its contents are totally different from 2.1.1 file without any reference to ${app.dir} and hence Sencha Cmd cannot use it. 它一直等待答案,所以它似乎是不兼容的问题,因为我使用sencha-touch 2.1.0生成了应用程序,并且它在/touch/cmd/sencha.cfg而不是/.sencha/app/上有了sencha.cfg 2.1.1应用程序中的sencha.cfg及其内容与2.1.1文件完全不同,没有引用$ {app.dir},因此Sencha Cmd无法使用它。 Any idea how to build 2.1.0 app? 知道如何构建2.1.0应用程序吗? One way I know is to get older version of sencha Cmd. 我知道的一种方法是获取旧版的sencha Cmd。

Like the first error states, ensure that you are in the application folder. 与第一个错误状态一样,请确保您位于应用程序文件夹中。 If you are, then check to see if your classpath in your sencha.cfg file is correct. 如果是,请检查sencha.cfg文件中的类路径是否正确。 So from the root of your app folder, open sencha.cfg: 因此,从app文件夹的根目录打开sencha.cfg:

vim .sencha/app/sencha.cfg

This is what my classpath looks like: app.classpath=${app.dir}/app.js,${app.dir}/app 这就是我的类路径: app.classpath=${app.dir}/app.js,${app.dir}/app

I had same issue, but the error appeared because I was not calling this command from sencha ExtJS library directory, i was calling from another directory where i wanted to create app. 我有同样的问题,但错误出现,因为我没有从sencha ExtJS库目录调用此命令,我从另一个目录,我想创建应用程序调用。 So if anyone is having same issue, call this command from library folder. 因此,如果有人遇到同样的问题,请从库文件夹中调用此命令。 eg i placed ext4.2 in following location: C:\\wamp\\www\\Ext4.2 In windows OS, C:\\wamp\\www\\Ext4.2>sencha generate app myapp myapp will create myapp for me. 例如,我将ext4.2放在以下位置: C:\\wamp\\www\\Ext4.2在Windows操作系统中, C:\\wamp\\www\\Ext4.2>sencha generate app myapp myapp将为我创建myapp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM