I’m new to Java/Eclipse/Android, so this is probably an easy (if not stupid) question:
After creating a new Android project, I want to import some (what I think are standard) java libraries.
However, some import statements throw an error:
HelloAndroid.java:
import java.awt.Color; (The import java.awt.Color cannot be resolved)
import javax.imageio.ImageIO; (The import javax.imageio cannot be resolved)
while others don’t:
import java.io.File; (no error)
I’ve done some googling and tried to add these classes to my classpath by going to project->properties->libraries but I haven’t been able to figure out what to do exactly.
Any pointers are greatly appreciated!
Cheers,
Martin
Android provides its own API and only a subset of the standard Java API.
awtandimageioare not included in the Android API, so you can’t use it.For example, if you want to manipulate images, use classes from the android.graphics package.