I want to insert a PNG image into my Excel sheet using Apache poi.
To do that I use this code:
//add picture data to this workbook.
InputStream is =
you cannot use java.awt.*
package in Android, use the Android UI elements instead. See related question here
You can't use pure Java libraries that involve graphics routines (java.awt
), because Android hasn't implemented them, as it uses it's own graphics library. Bottom line is, you can't use the library you want with Android, although I'm sure there's other ways to do the task you want to do.
Android uses a few base types, namely View
s, Canvas
, and Drawable
s. Take a look at those, and see if they meet your needs.