Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/387.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
Javascript Libgdx HTML项目未编译(没有可用的源代码…)_Javascript_Java_Gwt_Libgdx - Fatal编程技术网

Javascript Libgdx HTML项目未编译(没有可用的源代码…)

Javascript Libgdx HTML项目未编译(没有可用的源代码…),javascript,java,gwt,libgdx,Javascript,Java,Gwt,Libgdx,这是我第一次尝试使用libgdx项目的HTML版本,但在编译项目时遇到了问题。compileGwt任务失败,原因如下: [ERROR] Line 21: No source code is available for type de.tomgrill.gdxfacebook.core.GDXFacebook; did you forget to inherit a required module? [ERROR] Line 30: No source code is available for

这是我第一次尝试使用libgdx项目的HTML版本,但在编译项目时遇到了问题。compileGwt任务失败,原因如下:

[ERROR] Line 21: No source code is available for type de.tomgrill.gdxfacebook.core.GDXFacebook; did you forget to inherit a required module?
[ERROR] Line 30: No source code is available for type io.netty.channel. socket.SocketChannel; did you forget to inherit a required module?
对于不同的类,有更多的相同类型的错误。我的问题是:有可能让Netty和gdx facebook扩展在项目的HTML版本中工作吗?如果是,如何做到这一点?请注意,除了外行的“它将java转换为javascript代码”之外,我对GWT一无所知。欲了解更多信息,请询问。 谢谢

编辑:从html项目附加.iml文件

<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":html" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="portablefun" external.system.module.version="1.1" type="JAVA_MODULE" version="4">
  <component name="FacetManager">
    <facet type="android-gradle" name="Android-Gradle">
      <configuration>
        <option name="GRADLE_PROJECT_PATH" value=":html" />
      </configuration>
    </facet>
    <facet type="java-gradle" name="Java-Gradle">
      <configuration>
        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
        <option name="BUILDABLE" value="true" />
      </configuration>
    </facet>
  </component>
  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
    <output url="file://$MODULE_DIR$/build/classes/main" />
    <output-test url="file://$MODULE_DIR$/build/classes/test" />
    <exclude-output />
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
      <excludeFolder url="file://$MODULE_DIR$/build" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
    <orderEntry type="module" module-name="core" exported="" />
    <orderEntry type="library" exported="" name="gdx-backend-gwt-1.9.3" level="project" />
    <orderEntry type="library" exported="" name="gdx-backend-gwt-1.9.3-sources" level="project" />
    <orderEntry type="library" exported="" name="gdx-1.9.3-sources" level="project" />
    <orderEntry type="library" exported="" name="gdx-1.9.3" level="project" />
    <orderEntry type="library" exported="" name="gdx-box2d-1.9.3-sources" level="project" />
    <orderEntry type="library" exported="" name="gdx-box2d-gwt-1.9.3-sources" level="project" />
    <orderEntry type="library" exported="" name="json-20160212" level="project" />
    <orderEntry type="library" exported="" name="gwt-user-2.6.1" level="project" />
    <orderEntry type="library" exported="" name="gdx-box2d-1.9.3" level="project" />
    <orderEntry type="library" exported="" name="validation-api-1.0.0.GA" level="project" />
    <orderEntry type="library" exported="" name="validation-api-1.0.0.GA-sources" level="project" />
    <orderEntry type="library" exported="" scope="RUNTIME" name="gwt-servlet-2.6.0" level="project" />
  </component>
</module>

GWT将Java编译为Javascript,但只编译使用GWT自己的类进行仿真或编写的Java类。我认为您需要在模块描述符中继承它:

<inherits name = "src.de.tomgrill.gdxfacebook.GdxFacebookCore">

GWT将Java编译为Javascript,但只编译使用GWT自己的类进行仿真或编写的Java类。我认为您需要在模块描述符中继承它:

<inherits name = "src.de.tomgrill.gdxfacebook.GdxFacebookCore">


这是我现在拥有的完整的.gwt.xml,我应该在哪里添加它呢?:只要它是内部错误,添加到哪里并不重要:加载继承的模块“src.de.tomgril.gdxfacebook.GdxFacebookCore”[错误]在类路径上找不到“src/de/tomgril/gdxfacebook/GdxFacebookCore.gwt.xml”;可能是输入错误,也可能是您忘了为源代码包含类路径条目?[错误]第5行:处理元素“inherits”com.google.gwt.core.ext.UnableToCompleteException时出现意外异常:(请参阅以前的日志条目)您也可以发布pom.xml吗?没有pom.xml,但我在html项目中找到了一个.iml文件,附在上面。这是我现在拥有的完整的.gwt.xml,我应该在哪里添加它?:只要它是内部错误,在哪里添加它并不重要:加载继承的模块“src.de.tomgrill.gdxfacebook.GdxFacebookCore”[Error]在类路径上找不到“src/de/tomgrill/gdxfacebook/GdxFacebookCore.gwt.xml”;可能是输入错误,也可能是您忘了为源代码包含类路径条目?[错误]第5行:处理元素“inherits”com.google.gwt.core.ext.UnableToCompleteException时出现意外异常:(请参阅以前的日志条目)是否也可以发布pom.xml?没有pom.xml,但我在html项目中找到了一个.iml文件,见上面的附件。