【问题标题】:Sencha Cmd Unable to locate 'app.dir' config property from sencha.cfgSencha Cmd 无法从 sencha.cfg 中找到“app.dir”配置属性
【发布时间】:2013-02-07 10:38:31
【问题描述】:

我已经使用 Sencha touch 2.1.0 构建了一个 sencha touch 应用程序,现在我正在尝试使用此处提供的说明构建它:http://cclerville.blogspot.in/2013/01/sencha-touch-21-phonegap-220-android_3.html

但是构建失败并显示此错误消息,有人可以帮助我吗?

$ 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 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

【问题讨论】:

    标签: cordova extjs sencha-touch sencha-touch-2 sencha-touch-2.1


    【解决方案1】:

    等待答案很久了,所以这对我来说似乎是不兼容的问题,因为我使用 sencha-touch 2.1.0 生成了应用程序,并且它在 /touch/cmd/sencha.cfg 而不是 /.sencha 有 sencha.cfg 2.1.1 应用程序中的 /app/sencha.cfg 及其内容与 2.1.1 文件完全不同,没有任何引用 ${app.dir} ,因此 Sencha Cmd 无法使用它。知道如何构建 2.1.0 应用程序吗?我知道的一种方法是获取旧版本的 sencha Cmd。

    【讨论】:

      【解决方案2】:

      与第一个错误状态一样,确保您位于应用程序文件夹中。如果是,请检查 sencha.cfg 文件中的类路径是否正确。因此,从您的应用文件夹的根目录中,打开 sencha.cfg:

      vim .sencha/app/sencha.cfg

      这是我的类路径的样子:app.classpath=${app.dir}/app.js,${app.dir}/app

      【讨论】:

      • 嗯,对我来说似乎是不兼容问题,因为我使用 sencha-touch 2.1.0 生成了应用程序,并且它的 sencha.cfg 位于 /touch/cmd/sencha.cfg,而不是 2.1.1 应用程序及其中的 /.sencha/app/sencha.cfg内容与 2.1.1 文件完全不同,没有任何参考 ${app.dir},因此 Sencha Cmd 无法使用它。知道如何构建 2.1.0 应用程序吗?
      【解决方案3】:

      我有同样的问题,但出现错误是因为我没有从 sencha ExtJS 库目录调用此命令,而是从另一个我想创建应用程序的目录调用。因此,如果有人遇到同样的问题,请从库文件夹中调用此命令。例如,我将 ext4.2 放置在以下位置:C:\wamp\www\Ext4.2 在 Windows 操作系统中,C:\wamp\www\Ext4.2>sencha generate app myapp myapp 将为我创建 myapp

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-11-24
        • 2018-03-30
        • 2014-10-25
        • 1970-01-01
        • 1970-01-01
        • 2013-12-21
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多