PlayN/GWT - 你是否忘记继承一个必需的模块?

9
我在尝试将我的游戏编译成HTML时遇到了奇怪的问题。(我查看了其他主题,它们都涉及导入非法包,但我没有。)
基本上,我的主要类和外部类中调用的每个类都抛出此错误。这些类都是由我实现的,它们不会导入任何非法内容(没有反射,没有I/O,只有自己制作的类和jbox2d)。似乎它正在忽略导入或类似的东西。
为了测试这一点,我创建了一个名为Test的空类。当它在我的主要包中时,我没有收到任何错误,而当我将其移动到外部时,我收到了以下消息:
[INFO] [ERROR]第73行:无法获取类型progetto.saga.map.Test的源代码;您是否忘记继承所需的模块?
在第73行,我只是执行Test test = new Test()
这是我的.gwt.xml文件:
<module rename-to='theknowledgetower'>
  <inherits name='playn.PlayN'/>
  <inherits name='TheKnowledgeTowersAssets'/>

  <source path='core'/>
  <source path='html'/>

  <public path="resources" />

  <entry-point class='progetto.saga.html.TheKnowledgeTowersHtml'/>
</module>

你们有什么想法吗?

编辑:这是我得到的错误(在我的主类之外的每个自定义类中都会得到此错误)。

[INFO]       [ERROR] Line 53: No source code is available for type progetto.saga.navigable.Navigable; did you forget to inherit a required module?
[INFO]       [ERROR] Line 59: No source code is available for type progetto.saga.entity.dynamicentity.Player; did you forget to inherit a required module?
[INFO]       [ERROR] Line 110: No source code is available for type progetto.saga.navigable.button.Button; did you forget to inherit a required module?
[INFO]       [ERROR] Line 114: No source code is available for type progetto.saga.navigable.menu.HomeMenu; did you forget to inherit a required module?
[INFO]       [ERROR] Line 115: No source code is available for type progetto.saga.navigable.GameLoop; did you forget to inherit a required module?
[INFO]       [ERROR] Line 116: No source code is available for type progetto.saga.navigable.menu.CreationMenu; did you forget to inherit a required module?
[INFO]       [ERROR] Line 117: No source code is available for type progetto.saga.navigable.LoadingScreen; did you forget to inherit a required module?
[INFO]       [ERROR] Line 152: No source code is available for type progetto.saga.navigable.menu.GameMenu; did you forget to inherit a required module?
[INFO]       [ERROR] Line 153: No source code is available for type progetto.saga.map.cell.TowerFloor; did you forget to inherit a required module?
[INFO]       [ERROR] Line 154: No source code is available for type progetto.saga.map.cell.TowerWall; did you forget to inherit a required module?
[INFO]       [ERROR] Line 155: No source code is available for type progetto.saga.map.cell.TowerDecoration; did you forget to inherit a required module?
[INFO]       [ERROR] Line 156: No source code is available for type progetto.saga.entity.dynamicentity.enemy.Enemy; did you forget to inherit a required module?
[INFO]       [ERROR] Line 157: No source code is available for type progetto.saga.gui.Bar; did you forget to inherit a required module?
[INFO]       [ERROR] Line 158: No source code is available for type progetto.saga.entity.dynamicentity.equip.Equip; did you forget to inherit a required module?
[INFO]       [ERROR] Line 159: No source code is available for type progetto.saga.entity.dynamicentity.equip.Shield; did you forget to inherit a required module?
[INFO]       [ERROR] Line 160: No source code is available for type progetto.saga.entity.dynamicentity.spell.Spell; did you forget to inherit a required module?
[INFO]       [ERROR] Line 161: No source code is available for type progetto.saga.entity.staticentity.StorableDrop; did you forget to inherit a required module?
[INFO]       [ERROR] Line 162: No source code is available for type progetto.saga.entity.staticentity.Item; did you forget to inherit a required module?
2个回答

16

0
如果没有定义<source>元素,则默认情况下GWT将查找客户端路径,因此如果您将文件移动到客户端包下,它也应该可以工作。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接