2014-11-02 87 views
1

我試圖編譯我的libgdx遊戲,它的工作方式爲android和desktop,但不支持HTML GWT。libgdx-utils無法運行html libgdx

Im使用Intellij/Gradle作爲項目。

我只是說在這裏找到了libgdx-utils擴展的lib,這似乎是導致錯誤:https://bitbucket.org/dermetfan/libgdx-utils/wiki/Dependency%20Instructions

嘗試此gradle這個命令./gradlew html:dist當我得到的錯誤是:

:html:compileGwt     
Compiling module com.xx.xx.GdxDefinition 
    Validating units:    
     [ERROR] Errors in 'file:/xx/xx/xx/screens/GameScreen.java' 
     [ERROR] Line 66: No source code is available for type net.dermetfan.gdx.graphics.g2d.Box2DSprite; did you forget to inherit a required module? 
    [ERROR] Aborting compile due to errors in some input files 
:html:compileGwt FAILED   

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':html:compileGwt'. 
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 

我的搖籃文件看起來像這樣的:

buildscript { 
    repositories { 
     mavenCentral() 
     jcenter() 
    } 
    dependencies { 
     classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.5' 
     classpath 'com.android.tools.build:gradle:0.13+' 
     classpath 'org.robovm:robovm-gradle-plugin:1.0.0-alpha-04' 
    } 
} 

allprojects { 
    apply plugin: "eclipse" 
    apply plugin: "idea" 

    version = '1.0' 
    ext { 
     appName = 'xxx-xxx' 
     gdxVersion = '1.4.1' 
     roboVMVersion = '1.0.0-alpha-04' 
     box2DLightsVersion = '1.2' 
     ashleyVersion = '1.3.1' 
     aiVersion = '1.4.0' 
    } 

    repositories { 
     mavenCentral() 
     maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 
     maven { url "https://oss.sonatype.org/content/repositories/releases/" } 
    } 
} 

project(":desktop") { 
    apply plugin: "java" 


    dependencies { 
     compile project(":core") 
     compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" 
     compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 
     compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" 
    } 
} 

project(":android") { 
    apply plugin: "android" 

    configurations { natives } 

    dependencies { 
     compile project(":core") 
     compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" 
     natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" 
     natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" 
     natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" 
     compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" 
     natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi" 
     natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a" 
     natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86" 
    } 
} 

project(":ios") { 
    apply plugin: "java" 
    apply plugin: "robovm" 

    configurations { natives } 

    dependencies { 
     compile project(":core") 
     compile "org.robovm:robovm-rt:${roboVMVersion}" 
     compile "org.robovm:robovm-cocoatouch:${roboVMVersion}" 
     compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" 
     natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" 
     natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios" 
    } 
} 

project(":html") { 
    apply plugin: "gwt" 
    apply plugin: "war" 


    dependencies { 
     compile project(":core") 
     compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" 
     compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources" 
     compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" 
     compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources" 
     compile "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources" 
    } 
} 

project(":core") { 
    apply plugin: "java" 


    dependencies { 
     compile "com.badlogicgames.gdx:gdx:$gdxVersion" 
     compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" 
     compile 'net.dermetfan.libgdx-utils:libgdx-utils:0.7.0-SNAPSHOT' 
     compile 'net.dermetfan.libgdx-utils:libgdx-utils-box2d:0.7.0-SNAPSHOT' // Box2D module 
    } 
} 

tasks.eclipse.doLast { 
    delete ".project" 
} 

香港專業教育學院取得了一些進展

在我GdxDefinition.gwt.xml文件,我需要補充一些<inheritis>標籤:

<inherits name='libgdx-utils' /> 
<inherits name='libgdx-utils-box2d' /> 

該錯誤已經得到解決,但現在我有大約10000多個錯誤類似於

Compiling module com.xx/xx/.GdxDefinition 
    Validating units:    
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-backend-gwt/1.4.1/6a7814ff9cedbe7e7576d9578258fa99939fd092/gdx-backend-gwt-1.4.1-sources.jar!/com/badlogic/gwtref/gen/ReflectionCacheSourceCreator.java' 
     [ERROR] Line 103: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module? 
     [ERROR] Line 701: The method getAnnotation(Class<Retention>) is undefined for the type Class<capture#6-of ?> 
     [ERROR] Line 707: The method getCanonicalName() is undefined for the type Class<capture#7-of ?> 
     [ERROR] Line 709: No source code is available for type java.lang.reflect.Method; did you forget to inherit a required module? 
     [ERROR] Line 709: The method getDeclaredMethods() is undefined for the type Class<capture#8-of ?> 
     [ERROR] Line 713: The method getCanonicalName() is undefined for the type Class<capture#10-of ?> 
     [ERROR] Line 716: The method getCanonicalName() is undefined for the type Class<capture#12-of ?> 
     [ERROR] Line 724: No source code is available for type java.lang.reflect.InvocationTargetException; did you forget to inherit a required module? 
     [ERROR] Line 740: The method getCanonicalName() is undefined for the type Class 
     [ERROR] Line 744: The method getCanonicalName() is undefined for the type Class 
     [ERROR] Line 747: The method getCanonicalName() is undefined for the type Class<capture#21-of ?> 
     [ERROR] Line 748: No source code is available for type java.lang.reflect.Array; did you forget to inherit a required module? 
     [ERROR] Line 755: The method getCanonicalName() is undefined for the type Class<capture#23-of ?> 
     [ERROR] Line 786: The method getCanonicalName() is undefined for the type Class<capture#33-of ?> 
     [ERROR] Errors in 'file:/xx/xx/xx/screens/GameScreen.java' 
     [ERROR] Line 66: No source code is available for type net.dermetfan.gdx.graphics.g2d.Box2DSprite; did you forget to inherit a required module?    
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.0/8237d1bd37127188107388c8724be44a0e9f73ca/gwt-user-2.6.0.jar!/com/google/gwt/codegen/rebind/GwtCodeGenContext.java' 
     [ERROR] Line 52: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.0/8237d1bd37127188107388c8724be44a0e9f73ca/gwt-user-2.6.0.jar!/com/google/gwt/codegen/server/AbortablePrintWriter.java' 
     [ERROR] Line 26: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.0/8237d1bd37127188107388c8724be44a0e9f73ca/gwt-user-2.6.0.jar!/com/google/gwt/codegen/server/LoggingCodeGenContext.java' 
     [ERROR] Line 32: The method getAnonymousLogger() is undefined for the type Logger 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.0/8237d1bd37127188107388c8724be44a0e9f73ca/gwt-user-2.6.0.jar!/com/google/gwt/codegen/server/SafeHtmlStringGenerator.java' 
     [ERROR] Line 29: The method getCanonicalName() is undefined for the type Class<SafeHtmlBuilder> 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.6.0/8237d1bd37127188107388c8724be44a0e9f73ca/gwt-user-2.6.0.jar!/com/google/gwt/codegen/server/SourceWriterBase.java' 
     [ERROR] Line 63: The method format(String, Object[]) is undefined for the type String 
     [ERROR] Line 102: The method format(String, Object[]) is undefined for the type String 
     [ERROR] Line 116: The method format(String, Object[]) is undefined for the type String 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/DelegatingGeneratorContext.java' 
     [ERROR] Line 49: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/GeneratorContext.java' 
     [ERROR] Line 45: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/Linker.java' 
     [ERROR] Line 66: The method isAnnotationPresent(Class<Shardable>) is undefined for the type Class<capture#1-of ? extends Linker> 
     [ERROR] Line 71: The method getDeclaredField(String) is undefined for the type Class<capture#2-of ? extends Linker> 
     [ERROR] Line 73: No source code is available for type java.lang.NoSuchFieldException; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/ServletContainerLauncher.java' 
     [ERROR] Line 117: No source code is available for type java.net.BindException; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/StubGeneratorContext.java' 
     [ERROR] Line 40: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/TreeLogger.java' 
     [ERROR] Line 50: No source code is available for type java.net.URL; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/debug/JsoEval.java' 
     [ERROR] Line 133: No source code is available for type java.lang.reflect.InvocationTargetException; did you forget to inherit a required module? 
     [ERROR] Line 159: No source code is available for type java.lang.reflect.Method; did you forget to inherit a required module? 
     [ERROR] Line 159: The method getMethods() is undefined for the type Class<Object> 
     [ERROR] Line 175: No source code is available for type java.lang.ClassLoader; did you forget to inherit a required module? 
     [ERROR] Line 181: The method getMethods() is undefined for the type Class<capture#2-of ?> 
     [ERROR] Line 181: The method getMethods() is undefined for the type Class 
     [ERROR] Line 298: The method getClassLoader() is undefined for the type Class<capture#3-of ? extends Object> 
     [ERROR] Line 301: The method getClassLoader() is undefined for the type Class 
     [ERROR] Line 327: The method forName(String, boolean, ClassLoader) is undefined for the type Class 
     [ERROR] Line 339: The method forName(String, boolean, ClassLoader) is undefined for the type Class 
     [ERROR] Line 354: The method getMethods() is undefined for the type Class<Object> 
     [ERROR] Line 372: The method getMethod(String, Class[]) is undefined for the type Class 
     [ERROR] Line 392: The method getMethod(String, Class[]) is undefined for the type Class 
     [ERROR] Line 397: The method forName(String, boolean, ClassLoader) is undefined for the type Class 
     [ERROR] Line 436: The method isAssignableFrom(Class) is undefined for the type Class 
     [ERROR] Line 447: The method isAssignableFrom(Class) is undefined for the type Class 
     [ERROR] Line 463: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module? 
     [ERROR] Line 464: The method printStackTrace(PrintStream) in the type Throwable is not applicable for the arguments (PrintWriter) 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/Artifact.java' 
     [ERROR] Line 49: The method cast(Artifact<capture#6-of ?>) is undefined for the type Class<C> 
     [ERROR] Line 76: The method currentThread() is undefined for the type Thread 
     [ERROR] Line 77: The method asSubclass(Class<Linker>) is undefined for the type Class<capture#11-of ?> 
     [ERROR] Line 99: The method isAnnotationPresent(Class<Transferable>) is undefined for the type Class<capture#14-of ? extends Artifact> 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/ArtifactSet.java' 
     [ERROR] Line 89: The method isInstance(Artifact<capture#8-of ?>) is undefined for the type Class<T> 
     [ERROR] Line 90: The method cast(Artifact<capture#9-of ?>) is undefined for the type Class<T> 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/GeneratedResource.java' 
     [ERROR] Line 45: The method currentThread() is undefined for the type Thread 
     [ERROR] Line 46: The method asSubclass(Class<Generator>) is undefined for the type Class<capture#7-of ?> 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/ModuleMetricsArtifact.java' 
     [ERROR] Line 36: No source code is available for type java.util.concurrent.atomic.AtomicInteger; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/SyntheticArtifact.java' 
     [ERROR] Line 74: No source code is available for type java.io.ObjectInputStream; did you forget to inherit a required module? 
     [ERROR] Line 80: No source code is available for type java.io.ObjectOutputStream; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/impl/JarEntryEmittedArtifact.java' 
     [ERROR] Line 37: No source code is available for type java.util.jar.JarFile; did you forget to inherit a required module? 
     [ERROR] Line 67: No source code is available for type java.util.jar.JarEntry; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/impl/ResourceInjectionUtil.java' 
     [ERROR] Line 139: No source code is available for type java.net.URL; did you forget to inherit a required module? 
     [ERROR] Line 143: No source code is available for type java.net.MalformedURLException; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.j       ava'        
     [ERROR] Line 560: No source code is available for type java.net.URL; did you forget to inherit a required module? 
     [ERROR] Line 560: The method getResource(String) is undefined for the type Class<SelectionScriptLinker> 
     [ERROR] Line 567: No source code is available for type java.net.URLConnection; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/impl/StandardGeneratedResource.java' 
     [ERROR] Line 80: No source code is available for type java.io.ObjectInputStream; did you forget to inherit a required module? 
     [ERROR] Line 86: No source code is available for type java.io.ObjectOutputStream; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java' 
     [ERROR] Line 143: The method getAnnotation(Class<LinkerOrder>) is undefined for the type Class<capture#1-of ? extends Linker> 
     [ERROR] Line 165: The method getAnnotation(Class<LinkerOrder>) is undefined for the type Class<capture#6-of ? extends Linker> 
     [ERROR] Line 528: The method newInstance() is undefined for the type Class<capture#15-of ? extends Linker> 
     [ERROR] Line 529: No source code is available for type java.lang.InstantiationException; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/impl/StandardSelectionProperty.java' 
     [ERROR] Line 76: The method newInstance() is undefined for the type Class<capture#4-of ? extends PropertyProviderGenerator> 
     [ERROR] Line 79: No source code is available for type java.lang.InstantiationException; did you forget to inherit a required module?      
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/linker/impl/StandardSymbolData.java' 
     [ERROR] Line 49: The method toURI() is undefined for the type File 
     [ERROR] Line 52: No source code is available for type java.net.URI; did you forget to inherit a required module? 
     [ERROR] Line 53: No source code is available for type java.net.URISyntaxException; did you forget to inherit a required module? 
     [ERROR] Line 158: No source code is available for type java.io.ObjectInputStream; did you forget to inherit a required module? 
     [ERROR] Line 172: No source code is available for type java.io.InvalidObjectException; did you forget to inherit a required module? 
     [ERROR] Line 192: No source code is available for type java.io.ObjectOutputStream; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/soyc/SourceMapRecorder.java' 
     [ERROR] Line 53: No source code is available for type com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGenerator; did you forget to inherit a required module? 
     [ERROR] Line 53: No source code is available for type com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGeneratorFactory; did you forget to inherit a required module? 
     [ERROR] Line 53: No source code is available for type com.google.gwt.thirdparty.debugging.sourcemap.SourceMapFormat; did you forget to inherit a required module? 
     [ERROR] Line 77: No source code is available for type com.google.gwt.thirdparty.debugging.sourcemap.FilePosition; did you forget to inherit a required module? 
     [ERROR] Line 82: The method reset() is undefined for the type ByteArrayOutputStream 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/soyc/impl/DependencyRecorder.java' 
     [ERROR] Line 82: No source code is available for type java.util.zip.GZIPOutputStream; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/soyc/impl/MemberFactory.java' 
     [ERROR] Line 77: No source code is available for type java.lang.reflect.Constructor<T>; did you forget to inherit a required module? 
     [ERROR] Line 77: The method getConstructor(Class<MemberFactory>, Class<capture#5-of ? super K>) is undefined for the type Class<V> 
     [ERROR] Line 85: No source code is available for type java.lang.InstantiationException; did you forget to inherit a required module? 
     [ERROR] Line 91: No source code is available for type java.lang.reflect.InvocationTargetException; did you forget to inherit a required module? 
     [ERROR] Errors in 'jar:file:/private/var/root/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-dev/2.6.0/af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802/gwt-dev-2.6.0.jar!/com/google/gwt/core/ext/soyc/impl/SizeMapRecorder.java' 
     [ERROR] Line 177: No source code is available for type java.util.zip.GZIPOutputStream; did you forget to inherit a required module? 

它只是繼續下去,像這樣..

回答

3

GWT需要編譯的源代碼。將其添加到您的構建腳本中的HTML項目中:

compile 'net.dermetfan.libgdx-utils:libgdx-utils:0.7.2:sources' 
compile 'net.dermetfan.libgdx-utils:libgdx-utils-box2d:0.7.2:sources' 
+0

感謝您的回覆!嗯,我在'core'項目中有這些編譯語句,而在html項目中我做了'compile project(「:core」)'。另外,我認爲你輸錯了版本,因爲我得到以下錯誤:錯誤:無法找到:net.dermetfan.libgdx-utils:libgdx-utils:0.7.0'。你的意思是'0.7.0-SNAPSHOT'。我還在GdxDefinition文件中添加了'inherits'是需要的嗎?做完所有這些後,我仍然得到了我的問題中所述的相同錯誤。有小費嗎? – 2014-11-02 23:45:31

+0

核心項目的依賴關係與我在回覆中發佈的內容之間存在細微差別:我附加':sources',以便下載源文件而不是編譯的二進制文件。對不起,0.7.0版本被意外跳過。我編輯了我的回覆。 – dermetfan 2014-11-03 02:05:35

+0

我嘗試過'0.7.3:sources',但它不工作不幸。 '無法解析配置的所有依賴關係:html:compile'。 >無法找到net.dermetfan.libgdx-utils:libgdx-utils:0.7.3.' @dermetfan – 2014-11-03 03:56:51