javaandroiddrawellipse

"Cannot resolve symbol 'Ellipse2D' "


I've just found the class Ellipse2D.double . It's the perfect class for me to check if a circle collidates with an rectangle (class.rect). My problem is that I cannot integrate it in my Java/Android Project. If i want to declare an Object which should extends Ellipse2D.double it shows up "Cannot resolve symbol 'Ellipse2D' ". I really don't know what the problem is cause i found no Ellipse2D SDK or anything.


Solution

  • Ellipse2D class is located in the java.awt.geom package, which is an API to develop Java based GUI applications, that package is not available on the Android APIs, since the Android SDK provides other classes to build GUIs, an alternative would be the OvalShape or RectF classes as explained here: Differences between drawing an Ellipse in Android and Java