在创建 Maven 项目并将依赖项添加到 pom.xml 之后,我尝试学习 PlayN
enter code here
<dependency>
<groupId>com.threerings</groupId>
<artifactId>tripleplay</artifactId>
<version>1.0</version>
</dependency>
我将 Tripleplay 库中的类用于菜单系统,例如 Showcase 演示项目中所示。当作为 Java 应用程序运行项目时一切正常,但是当作为 html 应用程序运行时,我得到了这样的错误
ant.bat 运行-html
....
[java] com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
[java] at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140)
[java] at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71)
[java] at com.google.gwt.dev.jjs.impl.BuildTypeMap.getType(BuildTypeMap.java:730)
[java] at com.google.gwt.dev.jjs.impl.BuildTypeMap.createField(BuildTypeMap.java:570)
[java] at com.google.gwt.dev.jjs.impl.BuildTypeMap.access$300(BuildTypeMap.java:99)
[java] at com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.visit(BuildTypeMap.java:180)
[java] at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.traverse(FieldDeclaration.java:285)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1232)
[java] at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:687)
[java] at com.google.gwt.dev.jjs.impl.BuildTypeMap.createPeersForNonTypeDecls(BuildTypeMap.java:637)
[java] at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:514)
[java] at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:523)
[java] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:599)
[java] at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[java] [ERROR] <no source info>: public class tripleplay.ui.Interface
[java] extends java.lang.Object
[java] /* fields */
[java] public final [unresolved] playn.core.Pointer.Listener plistener
[java] public final [unresolved] playn.core.Keyboard.Listener klistener
[java] protected final [unresolved] playn.core.Pointer.Listener _delegate
[java] protected final [unresolved] Unresolved type react.Value<playn.core.Keyboard.Listener> _focused
[java] protected final [unresolved] List<Unresolved type tripleplay.ui.Root> _roots
[java] protected final [unresolved] List<Unresolved type tripleplay.ui.Root> _dispatch
[java] protected final [unresolved] List<Unresolved type java.lang.Runnable> _actions
怎么了?谢谢