Sencha CMD,从 6.0 升级到 6.1 IndexOutOfBoundsException

Sencha CMD, upgrading from 6.0 to 6.1 IndexOutOfBoundsException

我正在尝试 sencha app build 使用 Sencha CMD 6.1.1.76 但我得到:

BUILD FAILED
[ERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
[ERR]   at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97
[ERR] )

仅此而已:/

这个项目之前是使用6.0.0.92构建的

但是我在 sencha 的 cdn 上没有看到那个特定的 http://cdn.sencha.com/cmd/6.0.2.14/release-notes.html

我不认为我是唯一遇到此问题的人: https://www.sencha.com/forum/showthread.php?309457-IndexOutOfBoundsException-when-running-sencha-app-build-testing&p=1131708#post1131708

有没有人能够克服这个问题?

运行 sencha 应用程序升级没有帮助,ExtJs 5.0 在这个项目中使用。

我也得到了一个不同的异常,但它是由同一个任务发起的(slice-images within slice-impl.xml)

[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR]   at com.sench
[ERR] a.cli.Command.dispatch(Command.java:43)
[ERR] 
[ERR] Total time: 30 seconds
[ERR] The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/build-impl.xml:335: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:370: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:371: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:240: com.sencha.exceptions.BasicException: Java heap space

我曾尝试增加一些配置文件的堆大小,但没有成功。

所以这是我找到的解决方法,以便能够:

a) 在构建过程中生成 css 文件

b) 运行 构建过程中的所有其他任务。

最后我发现导致这个问题的行是:

ext.dir=${workspace.dir}/ext

那是在

.sencha/workspace/sencha.cfg

删除该行后,我能够 运行 sencha app build 并生成正确的 css 文件。

生产文件夹上的索引和资源看起来不错,但我在常规索引上遇到了一些问题...错误的引用等所以看起来我需要那个配置。

ext.dir=${workspace.dir}/ext

所以为了克服这个问题,我只是备份了我的 .css 文件,然后设置:

#comment out this line
#ext.dir=${workspace.dir}/ext

skip.slice=1

在.sencha/app/sencha.cfg

这是我找到的唯一方法:

1 构建项目

2 用不同的主题更新 .css。

更新

这会在组件上生成 'extjs trial' 水印,因此没有用...

如果我使用的是旧版本的框架,我通常会安装相应的 Sencha Cmd 版本。

在这种情况下,Sencha Cmd 版本 6.0.0.92 可能是测试版,如发行说明中所示:

Release Notes for Sencha Cmd 6.0.0 Beta

Date: May 22, 2015

Version Number: 6.0.0.154

所以这可能会很困难。

是否可以运行sencha app upgrade --noframework。我知道它是一个 ExtJS 5 应用程序,但这只会更新 Sencha Cmd 配置文件。之后您可以轻松合并您的更改,如果幸运的话,它可以与 Sencha Cmd 6 一起使用。1.x.

如果这不起作用,请运行sencha -d app build。这将生成大量信息,但它可能会给出一些关于确切原因的提示。您可以使用 sencha -d app build >build.log 创建日志文件。

祝你好运,Sencha Cmd 问题可能很难调试。