开发者

Trouble with GWT and Guava

I am having difficulty make GWT work with Guava. I added guava-r09-gwt.jar to my classpath, and <inherits name="com.google.common.collect.Collect"/> (copied from this question) to my *.gwt.xml file. However, I still get the following error:

[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?

The referenced line is:

List<String> suggs = Lists.newArrayList();

If I try the following inherits tag:

  <inherits name="com.google.common.collect.Lists"/>

Then GWT totally fails - going开发者_开发技巧 to the app in the browser gives a 404, and no URL appears in Eclipse's development panel.

What am I doing wrong?


You'll notice that com.google.gwt.thirdparty.guava.common.collect.Lists is not actually in the Guava jars. Try instead referencing com.google.common.collect.Lists and you should have some more success.


Buddy I had same problem (and asked here at StackOverflow), check it out in this thread. Hope that helps! And as Collin pointed out, you're having wrong import, don't use thirdpardy libraries from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜