error - No source code is available for type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • game2d
    New Member
    • Apr 2013
    • 59

    error - No source code is available for type

    I am using libgdx and getting a error. I am not sure what this error means and how can I fix this?

    error:
    Code:
    	[ERROR] [com.ia.asteroid.GwtDefinition] - Line 41: No source code is available for type java.awt.geom.Line2D.Float; did you forget to inherit a required module?
    	[ERROR] [com.ia.asteroid.GwtDefinition] - Line 42: No source code is available for type java.awt.geom.Point2D.Float; did you forget to inherit a required module?

    GwtDefintion.gw t.xml
    Code:
    <?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>
    	<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
    	<inherits name='MyGdxGame' />
        
    	<entry-point class='com.ia.asteroid.client.GwtLauncher' />
    	<set-configuration-property name="gdx.assetpath"
    		value="../Asteroid-android/assets" />
    </module>
    MyGdxGame.gwt.x ml
    Code:
    <?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="com/ia/asteroid" />
    	<source path="com/ia/Entity" />
    	<source path="com/ia/GameStates" />
    	<source path="com/ia/managers" />
    </module>
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    Hm, I've never consciously worked with GWT before (which is the library used by libGDX to translate Java to JavaScript) but it looks like there aren't translations for those two classes available. This project seems to have them though. So my suggestion would be to
    • either use other classes rather than Point2D and Line2D or
    • try including gwt-awt into your project.

    I'd guess that one of those should work; however whether you should really use AWT libraries in libGDX is a different question.

    Comment

    Working...