LibGDX - Conditionally use java or android classes
问题 I'm using bezier curves in my libgdx project. I was testing the desktop version using java.awt.geom with GeneralPath but when I went to test on android, it raised an error saying that I can't import java.awt . Android have corresponding classes for GeneralPath , Point2D etc so my question is how can I use those classes in their respective environments? 回答1: Android does not have an AWT implementation, so references to those classes won't work on Android. (On the desktop you're getting those