天天看點

java.awt.geom jar,如何在Android中添加“ java.awt.geom”類?

java.awt.geom jar,如何在Android中添加“ java.awt.geom”類?

I am making a game in LibGDX. When i run in libgdx-desktop, than it works fine. But when i run it in libgex-android than i get this error:

ERROR: Could not find class 'java.awt.geom.Line2D$Float[]', referenced from method com.ia.Entity.Player.hit

So libgdx-android can't seem to find line2d class. Any idea how can i fix this? Is there way i can just add a jar file or some thing in my libgdx-android project?

I really want to use 'java.awt.geom.line2d.flot[]' in android, but if answer is no, than what can i use instead?

解決方案

If I'm not mistaken, java.awt is not supported in android. However, I'm pretty sure libgdx has a geom class or something of that nature themselves.