在PlayN中,如何使用Google的Guava库来编译我的项目的HTML版本? [英] In PlayN, how can I get the HTML version of my project using Google's Guava libraries to compile?

查看:106
本文介绍了在PlayN中,如何使用Google的Guava库来编译我的项目的HTML版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以像这样简单地导入Guava库来运行项目的Java版本:

I can run the Java version of my project fine by simply importing Guava libraries like so:

import com.google.gwt.thirdparty.guava.common.collect.ImmutableList;

遵循这里,我已经将这行添加到html / pom.xml中:

Following the advice here, I've added this line to html/pom.xml:

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava-gwt</artifactId>
  <version>10.0.1</version>
</dependency>

以及这行到html / project.gwt.xml文件:

And this line to html/project.gwt.xml file:

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

但是当我尝试在Eclipse中编译我的HTML版本时,出现如下错误:

But when I try to GWT-Compile my HTML version in Eclipse, I get errors like the following:

[ERROR] Line 61: No source code is available for type com.google.gwt.thirdparty.guava.common.collect.ImmutableList<E>; did you forget to inherit a required module?


推荐答案

我想你可能会导入错误的类。尝试将 com.google.gwt.thirdparty.guava.common.collect.ImmutableList 导入替换为 com.google.common.collect.ImmutableList code>。

I think you may be importing the wrong class. Try replacing the com.google.gwt.thirdparty.guava.common.collect.ImmutableList import with com.google.common.collect.ImmutableList.

下面是关于 Lists 类的一个类似问题:

Here is a similar question about the Lists class: Trouble with GWT and Guava

这篇关于在PlayN中,如何使用Google的Guava库来编译我的项目的HTML版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆