<legend id='LNanj'><style id='LNanj'><dir id='LNanj'><q id='LNanj'></q></dir></style></legend>
      <i id='LNanj'><tr id='LNanj'><dt id='LNanj'><q id='LNanj'><span id='LNanj'><b id='LNanj'><form id='LNanj'><ins id='LNanj'></ins><ul id='LNanj'></ul><sub id='LNanj'></sub></form><legend id='LNanj'></legend><bdo id='LNanj'><pre id='LNanj'><center id='LNanj'></center></pre></bdo></b><th id='LNanj'></th></span></q></dt></tr></i><div id='LNanj'><tfoot id='LNanj'></tfoot><dl id='LNanj'><fieldset id='LNanj'></fieldset></dl></div>
      <tfoot id='LNanj'></tfoot>
      • <bdo id='LNanj'></bdo><ul id='LNanj'></ul>
      1. <small id='LNanj'></small><noframes id='LNanj'>

        将 libgdx 项目导出为 HTML - 您是否忘记继承所需的

        时间:2023-05-18
          <bdo id='yxO1e'></bdo><ul id='yxO1e'></ul>
            <tbody id='yxO1e'></tbody>

          1. <small id='yxO1e'></small><noframes id='yxO1e'>

            <i id='yxO1e'><tr id='yxO1e'><dt id='yxO1e'><q id='yxO1e'><span id='yxO1e'><b id='yxO1e'><form id='yxO1e'><ins id='yxO1e'></ins><ul id='yxO1e'></ul><sub id='yxO1e'></sub></form><legend id='yxO1e'></legend><bdo id='yxO1e'><pre id='yxO1e'><center id='yxO1e'></center></pre></bdo></b><th id='yxO1e'></th></span></q></dt></tr></i><div id='yxO1e'><tfoot id='yxO1e'></tfoot><dl id='yxO1e'><fieldset id='yxO1e'></fieldset></dl></div>
          2. <legend id='yxO1e'><style id='yxO1e'><dir id='yxO1e'><q id='yxO1e'></q></dir></style></legend>

          3. <tfoot id='yxO1e'></tfoot>

                1. 本文介绍了将 libgdx 项目导出为 HTML - 您是否忘记继承所需的模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我尝试以 HTML 格式导出我的 libgdx 游戏.我已经将它导出到 Android 和桌面上,并且效果很好.但是当我执行 ./gradlew html:dist 时,我有很多这样的错误:

                  I try to export my libgdx game in HTML. I already export it on Android and desktop, and it works well. But when I execute ./gradlew html:dist, I have many errors like this one:

                  [ERROR] Line 75: No source code is available for type net.spookygames.gdx.gameservices.playtomic.PlaytomicServicesHandler; did you forget to inherit a required module?
                  

                  net.spookygames.gdx.gameservices 是核心文件夹中我的主包旁边的一个包:

                  net.spookygames.gdx.gameservices is a package which is next to my main package in core folder:

                  我在 文档 和 另一个我需要使用反射的问题通过将此行放入我的 GdxDefinition.gwt.xml 文件夹中:

                  I saw on documentation and on another question that I need use reflection by putting this line in my GdxDefinition.gwt.xml in html folder:

                  <extend-configuration-property name="gdx.reflect.include" value="net.spookygames.gdx.gameservices" />
                  

                  但这并没有改变任何东西..我需要做其他事情吗?谢谢

                  But it didn't change anything.. Do I need to do something else? Thanks

                  这里是堆栈跟踪:

                  org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':html:compileGwt'.
                      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
                      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
                      at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
                      at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
                      at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
                      at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
                      at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
                      at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
                      at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
                      at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
                      at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
                      at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
                      at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
                      at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
                      at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
                      at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
                      at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
                      at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
                      at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
                      at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
                      at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
                      at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
                      at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
                      at org.gradle.internal.Factories$1.create(Factories.java:22)
                      at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
                      at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
                      at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
                      at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
                      at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
                      at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
                      at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
                      at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
                      at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
                      at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
                      at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
                      at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
                      at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
                      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
                      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
                      at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
                      at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
                      at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
                      at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
                      at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
                      at org.gradle.util.Swapper.swap(Swapper.java:38)
                      at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
                      at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
                      at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
                      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
                      at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
                      at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
                      at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
                      at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
                  Caused by: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1
                          at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367)
                          at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31)
                          at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:170)
                          at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:848)
                          at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:844)
                          at de.richsource.gradle.plugins.gwt.AbstractGwtActionTask.exec(AbstractGwtActionTask.java:72)
                          at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
                          at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
                          at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
                          at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
                          at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
                          at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
                          at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
                          at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
                          ... 68 more
                  

                  推荐答案

                  这里的问题不是反射造成的,我想你忘了继承外部包名net.spookygames.gdx.gameservices.

                  Here problem is not due to reflection, I think you forget to inherit external package name net.spookygames.gdx.gameservices.

                  您可以按照以下步骤操作:

                  You can follow these steps :

                  1. 创建与其他.gwt.xml平行的PlaytomicServicesHandler.gwt.xml,你会在你的核心模块中找到.

                  1. Create PlaytomicServicesHandler.gwt.xml parallel to other .gwt.xml, you will find inside your core module.

                  PlaytomicServicesHandler.gwt.xml的内容

                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
                  <module>
                      <source path="net/spookygames/gdx/gameservices" />
                  </module>
                  

                2. 打开GdxDefinition.gwt.xml

                  在模块标签里面放这个条目 <inherits name='PlaytomicServicesHandler'/>

                  Inside module tag put this entry <inherits name='PlaytomicServicesHandler' />

                  希望这能解决您的问题.

                  Hope this solve your problem.

                  这篇关于将 libgdx 项目导出为 HTML - 您是否忘记继承所需的模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                3. 上一篇:如何将 Sprite 纹理更改为动画 下一篇:使用 libgdx 加载图像

                  相关文章

                  最新文章

                  • <bdo id='U26iS'></bdo><ul id='U26iS'></ul>

                  <small id='U26iS'></small><noframes id='U26iS'>

                  <i id='U26iS'><tr id='U26iS'><dt id='U26iS'><q id='U26iS'><span id='U26iS'><b id='U26iS'><form id='U26iS'><ins id='U26iS'></ins><ul id='U26iS'></ul><sub id='U26iS'></sub></form><legend id='U26iS'></legend><bdo id='U26iS'><pre id='U26iS'><center id='U26iS'></center></pre></bdo></b><th id='U26iS'></th></span></q></dt></tr></i><div id='U26iS'><tfoot id='U26iS'></tfoot><dl id='U26iS'><fieldset id='U26iS'></fieldset></dl></div>

                    <tfoot id='U26iS'></tfoot>

                    1. <legend id='U26iS'><style id='U26iS'><dir id='U26iS'><q id='U26iS'></q></dir></style></legend>