1
\$\begingroup\$

I'm working on my first html5 game with libgdx, it's a platform android game that I made a while back that I now want to host on my website. Everything has been going okay till I got to animating the character. The desktop and android versions of the game run just fine but with the html version the game doesn't run and I get the following error:

GwtApplication: exception: Couldn't find type for class 'com.badlogic.gdx.graphics.g2d.TextureAtlas$AtlasRegion'

When I comment out the code sections for the animation the game runs fine (with the character not animated). What's causing the error and how can I fix it?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Probably reflection related, see stackoverflow.com/questions/44719343/… \$\endgroup\$ Commented Mar 26, 2018 at 8:51
  • 1
    \$\begingroup\$ I had looked at reflection and I've even used it in my current project for scene2D. Turns out I was using it incorrectly in this case though I was not specifying the full name of the class; I had <extend-configuration-property name="gdx.reflect.include" value="com.badlogic.gdx.graphics.g2d.TextureAtlas"/> while I need <extend-configuration-property name="gdx.reflect.include" value="com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion"/>. It's now working. \$\endgroup\$ Commented Mar 27, 2018 at 7:29

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.