简体   繁体   中英

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

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:

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. Any idea how to build 2.1.0 app? One way I know is to get older version of 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. So from the root of your app folder, open sencha.cfg:

vim .sencha/app/sencha.cfg

This is what my classpath looks like: 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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