6

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
ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56

3 Answers3

2

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.

ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
1

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

cclerv
  • 2,921
  • 8
  • 35
  • 43
  • 1
    Well 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? – ThinkFloyd Feb 08 '13 at 09:02
0

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. e.g 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.

Raza Ahmed
  • 2,661
  • 2
  • 35
  • 46