PlayN/GWT - did you forget to inherit a required module?
Asked Answered
G

2

9

I'm having a weird problem when I try to compile my game in HTML. (I searched the other topics and they refer to people who are importing illegal packages, which I'm not.)

So basically, every class called in my main one and outside of my main package throw me this error. These classes are all implemented by me and they dont import anything illegal (no reflection, no I/O, just selfmade classes and jbox2d). It seems like it's ignoring the import or something like that.

To test this, I created an empty class called Test. when it was in my main package I didn't get any error, while when I moved it outside, I got:

[INFO] [ERROR] Line 73: No source code is available for type progetto.saga.map.Test ; did you forget to inherit a required module?

at line 73, I just do Test test = new Test()

this is my .gwt.xml file:

<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>

do you guys have any idea?

Edit: this is the error I get (I get it for every custom class in my main class outside of my main package)

[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?
Glottal answered 18/10, 2013 at 0:8 Comment(0)
A
17

GWT only sees the classes living into the sub-packages listed in <source> elements of your gwt.xml file.

So you have to add <source path="navigable"/> for each and every subpackage you want to load classes from (from the error messages, navigable, entity, map, gui, etc.)

See http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules

Astronomical answered 18/10, 2013 at 8:5 Comment(0)
E
0

If no <source> element is defined , then by default GWT will look into the client path, so if you move your files under client package it should work as well.

Enterectomy answered 14/3, 2016 at 8:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.