Eclipse GWT编译错误

时间:2014-01-22 19:56:14

标签: java eclipse gwt libgdx

首先,我正在使用eclipse和libgdx。我试图在网上运行我的游戏,但在gwt编译期间继续出错。游戏在桌面上编译和运行完美,没有错误或警告。我试图清除项目缓存。我创建了一个新项目并复制了我的所有数据。试图查看错误,但无法找到它指出的行。

非常感谢任何帮助。

     [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
    at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:434)
    at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:403)
    at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
    at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
    at com.google.gwt.dev.jjs.ast.JClassType.traverse(JClassType.java:98)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:287)
    at com.google.gwt.dev.jjs.ast.JProgram.traverse(JProgram.java:1032)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    at com.google.gwt.dev.jjs.impl.gflow.DataflowOptimizer.execImpl(DataflowOptimizer.java:117)
    at com.google.gwt.dev.jjs.impl.gflow.DataflowOptimizer.exec(DataflowOptimizer.java:48)
    at com.google.gwt.dev.jjs.impl.gflow.DataflowOptimizer.exec(DataflowOptimizer.java:54)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimize(JavaToJavaScriptCompiler.java:788)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:714)
    at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
    at com.google.gwt.dev.Compiler.run(Compiler.java:232)
    at com.google.gwt.dev.Compiler.run(Compiler.java:198)
    at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
    at com.google.gwt.dev.Compiler.main(Compiler.java:177)
Caused by: java.lang.RuntimeException: Error optimizing: com.badlogic.gdx.utils.Array.$contains
    at com.google.gwt.dev.jjs.impl.gflow.DataflowOptimizer$DataflowOptimizerVisitor.visit(DataflowOptimizer.java:108)
    at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:80)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    ... 27 more
Caused by: com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
    at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
    at com.google.gwt.dev.jjs.ast.JWhileStatement.traverse(JWhileStatement.java:46)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    at com.google.gwt.dev.jjs.impl.gflow.unreachable.DeleteNodeVisitor.delete(DeleteNodeVisitor.java:26)
    at com.google.gwt.dev.jjs.impl.gflow.unreachable.DeleteNodeTransformation$1.transform(DeleteNodeTransformation.java:52)
    at com.google.gwt.dev.jjs.impl.gflow.cfg.Cfg.transform(Cfg.java:172)
    at com.google.gwt.dev.jjs.impl.gflow.cfg.Cfg.transform(Cfg.java:30)
    at com.google.gwt.dev.jjs.impl.gflow.AnalysisSolver.applyTransformation(AnalysisSolver.java:233)
    at com.google.gwt.dev.jjs.impl.gflow.AnalysisSolver.actualize(AnalysisSolver.java:208)
    at com.google.gwt.dev.jjs.impl.gflow.AnalysisSolver.solveIntegrated(AnalysisSolver.java:400)
    at com.google.gwt.dev.jjs.impl.gflow.AnalysisSolver.solveIntegrated(AnalysisSolver.java:162)
    at com.google.gwt.dev.jjs.impl.gflow.DataflowOptimizer$DataflowOptimizerVisitor.visit(DataflowOptimizer.java:88)
    ... 30 more
Caused by: java.lang.UnsupportedOperationException: Can't remove if (items[i--] == "None")
  return true
    at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.removeMe(JModVisitor.java:234)
    at com.google.gwt.dev.jjs.impl.gflow.unreachable.DeleteNodeVisitor.visit(DeleteNodeVisitor.java:58)
    at com.google.gwt.dev.jjs.ast.JVisitor.visit(JVisitor.java:795)
    at com.google.gwt.dev.jjs.ast.JVisitor.visit(JVisitor.java:630)
    at com.google.gwt.dev.jjs.ast.JIfStatement.traverse(JIfStatement.java:49)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    ... 45 more
      [ERROR] at Array.java(160): {
  final Object[] items = this$static.items;
  int i = this$static.size - 1;
  if (false) {
  } else {
    while (i >= 0)
      if (String.$equals("None", items[i--]))
        return true;
  }
  return false;
}
         com.google.gwt.dev.jjs.ast.JMethodBody
      [ERROR] at Array.java(160): public static final boolean $contains(Array this$static);

         com.google.gwt.dev.jjs.ast.JMethod
      [ERROR] at Array.java(29): final class Array extends Object implements Iterable 
         com.google.gwt.dev.jjs.ast.JClassType
      [ERROR] at Unknown(0): <JProgram>
         com.google.gwt.dev.jjs.ast.JProgram
Shutting down PersistentUnitCache thread

更新:没有错误地命名任何方法。多次清除gwt_unitCache。尝试过编辑我的代码但没有成功。

0 个答案:

没有答案