使用跨站点支持编译 GWT 代码时出错
在我们的 *EntryPoint.gwt.xml
中,我们包含以下内容以获得跨站点支持:
没有任何更改代码,我们在编译过程中得到以下错误:
[java] Compile of permutations succeeded
[java] Linking into ...
[java] Invoking Linker Cross-Site
[java] [ERROR] The module must not have multiple fragments when using the Cross-Site Linker.
[java] [ERROR] Failed to link
[java] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
[java] at com.google.gwt.core.linker.XSLinker.doEmitCompilation(XSLinker.java:49)
[java] at com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.link(SelectionScriptLinker.java:108)
[java] at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLink(StandardLinkerContext.java:408)
[java] at com.google.gwt.dev.Link.doLink(Link.java:194)
[java] at com.google.gwt.dev.Link.link(Link.java:151)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:228)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:159)
[java] Java Result: 1
这是什么意思?我们在项目中使用了具有多模块结构的mvp4g,因此它们存在延迟加载。 “多个片段”是否意味着结果有多个 .cache.html
文件?
GWT 中有一个问题 14,但没有人有什么答案吗?
In our *EntryPoint.gwt.xml
we include the following to get Cross-Site support:
<add-linker name="xs" />
With no changes to the code, we got the following error during compilation:
[java] Compile of permutations succeeded
[java] Linking into ...
[java] Invoking Linker Cross-Site
[java] [ERROR] The module must not have multiple fragments when using the Cross-Site Linker.
[java] [ERROR] Failed to link
[java] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
[java] at com.google.gwt.core.linker.XSLinker.doEmitCompilation(XSLinker.java:49)
[java] at com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.link(SelectionScriptLinker.java:108)
[java] at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLink(StandardLinkerContext.java:408)
[java] at com.google.gwt.dev.Link.doLink(Link.java:194)
[java] at com.google.gwt.dev.Link.link(Link.java:151)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:228)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:159)
[java] Java Result: 1
What does it mean? We use mvp4g with multi-modules structure in our project, so there is lazy-loading for them. Does "mutiple fragments" mean that there are several .cache.html
files as a result?
There is an issue 14 in GWT but no-one has any answers to it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GWT 中还有一个问题 5046,有人说带有 XS Linker 的代码拆分(在 Mvp4g 多模块中使用)可与 GWT 2.1.1 配合使用,但现在没有时间为我们的项目更新库,我们计划稍后再更新。无论如何,这是一个答案 - 更新您的 GWT 库或关闭代码分割或不使用 XS。
更新。是的,我们已将 GWT 更新到 2.1.1,并且
*-xs.nocache.js
工作正常。There is also an issue 5046 in GWT, and someone says that Code Splitting (used in Mvp4g Multi-Modules) with XS Linker works with GWT 2.1.1, but there is no time to update library for our project now, we plan to do it a little later. Anyway, it is an answer - update your GWT library or turn off Code-Splitting or don't use XS.
Upd. Yes, we've updated GWT to 2.1.1 and
*-xs.nocache.js
works fine.