我有一个 GWT 问题,
我正在尝试将我的 css 作为 CssResource 移动到 ClientBundle,因为它声称是最佳实践,但是有一个问题。它确实适用于元素 ID 和元素名称,但不适用于类名。所以当我有
div{
color: red;
}
#whatever_id{
color: black;
}
但是,如果我添加一个带点 (.) 的类名作为
div{
color: red;
}
#whatever_id{
color: black;
}
.whatever_classname{
color: green;
}
然后我得到以下异常
onModuleLoad() threw an exception
Exception while loading module com.acatime.edutime.client.edutime. See Development Mode for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ExceptionInInitializerError
at com.acatime.edutime.client.edutime.onModuleLoad(edutime.java:29)
... 9 more
Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.acatime.edutime.client.resources.GeneralResources' (did you forget to inherit a required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.shared.GWT.create(GWT.java:72)
at com.google.gwt.core.client.GWT.create(GWT.java:86)
at com.acatime.edutime.client.resources.GeneralResources.<clinit>(GeneralResources.java:11)
... 10 more
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
... 13 more
知道我错过了什么吗???