2011-06-15 72 views
5

我很难让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。

我在做什么错?

回答

7

你会注意到com.google.gwt.thirdparty.guava.common.collect.Lists实际上并不在番石榴罐子里。试着引用com.google.common.collect.Lists,你应该有更多的成功。

0

好友我有同样的问题(并在StackOverflow问这里),检查出in this thread。希望有所帮助!正如Collin指出的那样,你输入错误,不要从那里使用第三方库。