ExtJS - sencha 应用程序构建依赖错误

ExtJS - sencha app build dependency error

我正在尝试扩展第三方 class。代码是这样的。注意我正在指定加载位置 openGL.view.

Ext.Loader.setPath({
    'openGL.view': 'C:/Users/«username»/Documents/third-party/openGL/view/'
});

Ext.define('myOpenGL.view.Qxga',{
    extend: 'openGL.view.Uxga',
    alias: 'widget.qxga',
    itemId: 'qxga',
    requires: [
            'openGL.view.Uxga',
            'myOpenGL.view.QxgaController'
    ],
    controller: 'QxgaController'
});

构建时,出现如下错误:

[ERR] Failed to resolve dependency openGL.view.Uxga for file myOpenGL.view.Qxga
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : openGL.view.Uxga
[ERR]
[ERR] Total time: 6 seconds
[ERR] The following error occurred while executing this line:
C:\Users\«username»\Applications\Sencha\Cmd.1.0.26\plugins\ext\current\plugin.xml:403: The following error occurred while executing this line:
C:\Users\«username»\Documents\workspace\openGL\.sencha\app\build-impl.xml:378: The following error occurred while executing this line:
C:\Users\«username»\Documents\workspace\openGL\.sencha\app\init-impl.xml:303: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : openGL.view.Uxga

一些问题:

Sencha Cmd 不知道 Ext.Loader.setPath 调用,Cmd 不执行 JavaScript。相反,在您的 app.json 中,您可以将 C:/Users/«username»/Documents/third-party 添加到 classpath 配置中。 classpath 是一个 comma-delimited (我认为现在它甚至可以是一个数组)路径列表 Cmd 将用来检查其中的文件以搜索 Ext JS classes (或通过某些评论标签,如@require 和@class)。

"classpath": "app,C:/Users/«username»/Documents/third-party"