2013-10-18 11 views
8

Oyunumu HTML’de derlemeye çalıştığımda garip bir sorun yaşıyorum. (Diğer konuları araştırdım ve yasadışı paketleri içe aktaran kişilere başvururlar.)PlayN/GWT - gerekli bir modülü mi almayı unuttun?

Temel olarak, ana paketimde ve ana paketimin dışındaki her sınıf bu hatayı bana attı. Bu sınıfların hepsi benim tarafımdan uygulanmakta ve yasadışı bir şey ithal etmemektedirler (yansıma yok, G/Ç yok, sadece kendi sınıfları ve jbox2d). İthalatı görmezden geliyormuş gibi gözüküyor.

Bunu test etmek için Test adlı boş bir sınıf oluşturdum. benim ana paket içinde iken dışarıda taşındığında, ben var ise ben, herhangi bir hata almadım:

[INFO] [HATA] Hat 73: Hiçbir kaynak kod tipi progetto.saga için kullanılabilir .map.Test; Gerekli bir modülü mi almayı unuttun? hat 73 at

, sadece do Test test = new Test()

bu benim .gwt.xml dosyasıdır:

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

siz bir fikrin var mı?

Düzenleme: Bu ben

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

cevap

15

GWT sadece alt pakete yaşayan sınıfları görür (benim ana paketin dışında benim ana sınıfındaki her özel sınıf için olsun) olsun hatadır gwt.xml dosyanızın <source> öğelerinde listelenmektedir.

Yani her biri için <source path="navigable"/> eklemek zorunda ve her aralarından sınıfları yüklemek istediğiniz alt paketin

(hata iletileri, navigable, entity, map, gui, vb) hiçbir http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules

+0

Sorunumu çözdüğünüz çok teşekkürler: D – Epi

+0

Sorunun ne olduğu hakkında herhangi bir fikir [burada] (http://stackoverflow.com/questions/37365459/no-source-code-is-available-for-type-type) -Bunu-sen unut to-inherit-a-gerekli? – displayname

0

Eğer görün <source> öğesi tanımlanmıştır, sonra varsayılan olarak GWT, istemci yoluna bakacaktır, bu nedenle dosyalarınızı istemci paketi altında taşırsanız, aynı zamanda çalışmalıdır.

İlgili konular