java - GWT:本地化后托管模式错误

标签 java gwt

将我的 gwt 应用程序设置为“国际化”后,我遇到了一些问题。

我的应用程序.gwt.xml:

<module rename-to='app'>
    <!-- Inherit the core Web Toolkit stuff. -->
    <inherits name='com.google.gwt.user.User' />
    <inherits name="com.google.gwt.i18n.I18N" />

    <!-- Inherit the default GWT style sheet. -->
    <inherits name='com.google.gwt.user.theme.standard.Standard' />
    <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
    <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->

    <!-- Specify the app entry point class. -->
    <entry-point class='dk.blabla.app.client.Entry' />

    <!-- Specify the paths for translatable code -->
    <source path='client' />
    <source path='shared' />

    <!-- Specify the locales you will be supporting -->
    <extend-property name="locale" values="da" />
</module>

然后我将以下内容添加到 app.html header

<meta name="gwt:property" content="locale=en"> 

现在我无法在托管模式下启动我的应用程序。我收到以下错误

[ERROR] [app] - Deferred binding failed for 'com.google.gwt.i18n.client.impl.CldrImpl'; expect subsequent failures

[ERROR] [app] Unable to load module entry point class dk.blabla.app.client.App (see associated exception for details) java.lang.RuntimeException: Deferred binding failed for 'com.google.gwt.i18n.client.impl.CldrImpl' (did you forget to inherit a required module?)

编辑:

顺便说一下,我正在使用 eclipse 和 google 插件。

最佳答案

我认为你应该添加

<inherits name="com.google.gwt.i18n.CldrLocales"/>

到您的 app.gwt.xml。 有关详细信息,请参阅 Runtime Locales

关于java - GWT:本地化后托管模式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4806876/

相关文章:

java - 对哈希表中使用的字符串进行哈希处理(双重哈希)

java - 如何在命令提示符下使用 xjc 从 WSDL 使用 @XmlRootElement 生成 java 类

java - GWT 单元树,选择太多选项!

java - 谷歌 adt/gwt 支持 eclipse 4.4 (Luna)

java - 使 Gradle 包含整个依赖树中的所有源

java - 创建两个相同长度的字符串,一个重复另一个的结构,同时一遍又一遍地循环相同的字母

java - 具有嵌入式 Jetty 服务的 JAX-RS - 主页 URL

java - JSTL fn :subStringBetween?

css - 更改 GWT tabBar 元素的 CSS

css - 如何在 GWT 中生成颜色并在 CSS 中动态应用它