Java 将libgdx项目导出为HTML-您是否忘记继承所需的模块?
我尝试用HTML导出我的libgdx游戏。我已经在Android和桌面上导出了它,而且运行良好。但是当我执行Java 将libgdx项目导出为HTML-您是否忘记继承所需的模块?,java,gwt,reflection,libgdx,Java,Gwt,Reflection,Libgdx,我尝试用HTML导出我的libgdx游戏。我已经在Android和桌面上导出了它,而且运行良好。但是当我执行/gradlew html:dist时,我有很多类似这样的错误: [ERROR] Line 75: No source code is available for type net.spookygames.gdx.gameservices.playtomic.PlaytomicServicesHandler; did you forget to inherit a required mod
/gradlew html:dist
时,我有很多类似这样的错误:
[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是一个包,位于核心文件夹中我的主包旁边:
通过将这一行放在html文件夹中的GdxDefinition.gwt.xml中,我发现我需要使用反射:
<extend-configuration-property name="gdx.reflect.include" value="net.spookygames.gdx.gameservices" />
这里的问题不是由于反射,我认为您忘记了继承外部包名
net.spookygames.gdx.gameservices
您可以按照以下步骤操作:
.gwt.xml
并行的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>
GdxDefinition.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>
在模块标签内放置此条目
希望这能解决您的问题。这里的问题不是由于反射,我认为您忘记了继承外部包名
net.spookygames.gdx.gameservices
您可以按照以下步骤操作:
.gwt.xml
并行的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>
GdxDefinition.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>
在模块标签内放置此条目
希望这能解决你的问题。好吧,哈哈,你的答案是正确的,但是在路径中,你在每个文件夹之间都放了点,而不是“/”。谢谢我的错误,这是由于复制粘贴的包,我会更新我的答案,当我回到家。因为我看到你是相当强大的gwt和libgdx,你可以看看我的新问题?()谢谢好的,哈哈,你的答案是正确的,但是在路径中,你在每个文件夹之间放了点,而不是“/”。谢谢我的错误,这是由于复制粘贴的包,我会更新我的答案,当我回到家。因为我看到你是相当强大的gwt和libgdx,你可以看看我的新问题?谢谢