當我嘗試在HTML中編譯我的遊戲時,我遇到了一個奇怪的問題。 (我搜索了其他主題,他們指的是導入非法軟件包的人,我不是)PlayN/GWT - 你忘了繼承一個必需的模塊嗎?
所以基本上,每個在我的主包中調用的類都會拋出我的這個錯誤。這些類都是我自己實現的,它們不會導入任何非法的東西(沒有反射,沒有I/O,只有自制類和jbox2d)。它似乎忽略了導入或類似的東西。
爲了測試這個,我創建了一個名爲Test的空類。當它在我的主包,我沒有得到任何錯誤,而當我搬到外面了,我得到了:
[INFO] [錯誤] 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?
非常感謝您解決了我的問題:D – Epi
任何想法是什麼問題[這裏](http://stackoverflow.com/questions/37365459/no-source-code-is-available-for-type-type -did,你忘到繼承-A-必需的)? – displayname