Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在GWT应用程序中包括番石榴GWT_Java_Gwt_Guava - Fatal编程技术网

Java 在GWT应用程序中包括番石榴GWT

Java 在GWT应用程序中包括番石榴GWT,java,gwt,guava,Java,Gwt,Guava,我正在尝试将番石榴添加到GWT2.6.1应用程序中。我包括了番石榴-19.0.jar和番石榴-gwt-19.0.jar 我补充说 到我的“MyApp.gwt.xml”文件。当我通过超级开发模式运行应用程序时,会出现这个错误,我不知道该怎么办 Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. [ERROR] Errors in 'jar:file:/C:/Projects/my_p

我正在尝试将番石榴添加到GWT2.6.1应用程序中。我包括了番石榴-19.0.jar和番石榴-gwt-19.0.jar

我补充说

到我的“MyApp.gwt.xml”文件。当我通过超级开发模式运行应用程序时,会出现这个错误,我不知道该怎么办

Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   [ERROR] Errors in 'jar:file:/C:/Projects/my_proj/code/my_gwt_app/main_app/libs/guava/guava-gwt-19.0.jar!/com/google/common/collect/super/com/google/common/collect/RegularImmutableAsList.java'
      [ERROR] Line 20: The import com.google.j2objc cannot be resolved
      [ERROR] Line 31: Weak cannot be resolved to a type
[ERROR] Compiler returned false
我有一个使用番石榴的类,并且有以下导入:

import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;

我不明白“超级”文件夹/包引用是指什么。我看到了一个
com.google.common.collect.super.com.google.common.collect
包,但我不知道如何在我的gwt.xml文件中引用它。

看看
番石榴gwt
的POM,你会看到它有自己的依赖项,包括j2objc

<dependency>
    <groupId>com.google.j2objc</groupId>
    <artifactId>j2objc-annotations</artifactId>
    <optional>false</optional>
</dependency>

com.google.j2objc
j2objc注释
假的

即使在我的构建路径中添加了j2objc注释,我仍然得到了与隐形拉比相同的信息。我一辈子都搞不懂为什么。你把inherit添加到模块的gwt.xml文件了吗?我添加了。据我所知,这是唯一的GWT模块——还有什么我应该继承的吗?