GWT编译错误

时间:2016-06-07 14:19:18

标签: java gwt libgdx

我正在尝试GWT将libgdx代码编译为html5,我收到以下错误:

Resolving javax.validation.metadata.Scope
  Found type 'javax.validation.metadata.Scope'
     [ERROR] Unable to find class java/lang/Enum
     Resolving method valueOf
        [ERROR] Unable to resolve type java/lang/String of argument arg0
Tracing compile failure path for type 'java.lang.Object'
  [ERROR] Errors in 'jar:file:/home/juraj/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.1/c078b1b8cc0281214b0eb458d2c283d039374fad/gwt-user-2.6.1.jar!/com/google/gwt/emul/java/lang/Object.java'
     [ERROR] java.lang.Class cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/core/client/JavaScriptObject.java'
     [ERROR] java.lang.Object cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/lang/Throwable.java'
     [ERROR] java.io.PrintStream cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/lang/Class.java'
     [ERROR] Line 168: Referencing class 'com.google.gwt.lang.SeedUtil': unable to resolve class
     [ERROR] Line 119: Referencing class 'com.google.gwt.lang.SeedUtil': unable to resolve class
  [ERROR] Errors in 'jar:file:/home/juraj/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.1/c078b1b8cc0281214b0eb458d2c283d039374fad/gwt-user-2.6.1.jar!/com/google/gwt/emul/java/lang/String.java'
     [ERROR] java.lang.Object cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/home/juraj/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.1/c078b1b8cc0281214b0eb458d2c283d039374fad/gwt-user-2.6.1.jar!/com/google/gwt/emul/java/io/PrintStream.java'
     [ERROR] java.lang.Object cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/home/juraj/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.1/c078b1b8cc0281214b0eb458d2c283d039374fad/gwt-user-2.6.1.jar!/com/google/gwt/emul/java/lang/StackTraceElement.java'
     [ERROR] java.lang.String cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/lang/CharSequence.java'
     [ERROR] java.lang.String cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/home/juraj/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.1/c078b1b8cc0281214b0eb458d2c283d039374fad/gwt-user-2.6.1.jar!/com/google/gwt/emul/java/lang/StringBuffer.java'
     [ERROR] java.lang.Object cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/lang/StringBuilder.java'
     [ERROR] java.lang.Object cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/util/Comparator.java'
     [ERROR] java.lang.Object cannot be resolved to a type
  [ERROR] Errors in 'com/badlogic/gdx/backends/gwt/emu/java/io/UnsupportedEncodingException.java'
     [ERROR] java.lang.String cannot be resolved to a type
    [ERROR] Errors in 'com/badlogic/gdx/backends/gwt/emu/java/io/OutputStream.java'
     [ERROR] java.io.IOException cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/io/FilterOutputStream.java'
     [ERROR] java.io.OutputStream cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/home/juraj/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.1/c078b1b8cc0281214b0eb458d2c283d039374fad/gwt-user-2.6.1.jar!/com/google/gwt/core/client/impl/StringBufferImpl.java'
     [ERROR] java.lang.Object cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/lang/Appendable.java'
     [ERROR] java.lang.CharSequence cannot be resolved to a type
  [ERROR] Errors in 'com/badlogic/gdx/backends/gwt/emu/java/io/IOException.java'
     [ERROR] java.lang.String cannot be resolved to a type
  [ERROR] Errors in 'com/google/gwt/emul/java/lang/Exception.java'
     [ERROR] java.lang.String cannot be resolved to a type
    Error saving unit to cache in:  /home/juraj/EclipseProjects/Windy/html/gwt-unitCache
 java.io.EOFException
  at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803)
at com.google.gwt.dev.util.DiskCache.transferToStream(DiskCache.java:186)
at com.google.gwt.dev.util.DiskCacheToken.writeObject(DiskCacheToken.java:73)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at java.util.ArrayList.writeObject(ArrayList.java:762)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at com.google.gwt.dev.javac.CachedCompilationUnit.writeObject(CachedCompilationUnit.java:223)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at com.google.gwt.dev.javac.PersistentUnitCache$6.run(PersistentUnitCache.java:502)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

我正在使用Eclipse来运行gwt编译我在这里提到了GWT Compile窗口中的默认设置https://github.com/libgdx/libgdx/wiki/Deploying-your-application

0 个答案:

没有答案