GWT和Guava麻烦
问题描述:
我很难让GWT与番石榴一起工作。我将guava-r09-gwt.jar
添加到我的课程路径中,并将<inherits name="com.google.common.collect.Collect"/>
(从this question复制)添加到我的*.gwt.xml
文件中。但是,我还是得到了以下错误:GWT和Guava麻烦
[ERROR] Line 99: No source code is available for type com.google.gwt.thirdparty.guava.common.collect.Lists; did you forget to inherit a required module?
的参考线是:
List<String> suggs = Lists.newArrayList();
如果我尝试以下inherits
标签:
<inherits name="com.google.common.collect.Lists"/>
然后GWT完全失败 - 要浏览器中的应用程序提供了404,并且Eclipse的开发面板中没有出现任何URL。
我在做什么错?
答
你会注意到com.google.gwt.thirdparty.guava.common.collect.Lists
实际上并不在番石榴罐子里。试着引用com.google.common.collect.Lists
,你应该有更多的成功。