Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add java.awt.image package in Android

Tags:

android

image

jar

I have an external library that relies on the java.awt.Image package. However, the Android library does not contain it. Does anybody know how to add it to Android? Thanks!

like image 752
wzb5210 Avatar asked Jun 14 '11 13:06

wzb5210


People also ask

What is import java AWT * in java?

Java AWT. Java AWT (Abstract Window Toolkit) is an API to develop GUI or window-based applications in java. Java AWT components are platform-dependent i.e. components are displayed according to the view of operating system. AWT is heavyweight i.e. its components are using the resources of OS.

What does java AWT image do?

awt. image. Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

What is java AWT package?

The AWT package contains several layout manager classes and an interface for building your own layout manager. See Container and LayoutManager for more information. Each Component object is limited in its maximum size and its location because the values are stored as an integer.

What package provides classes for AWT API?

The java.awt package provides classes for AWT API such as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List etc.


2 Answers

The Java AWT classes contain native code, so unless someone ports that native code to Android, you are out of luck. And, they won't port it, because as it was pointed out above, Android has its own graphics libraries (android.graphics).

like image 137
Jeffrey Blattman Avatar answered Sep 19 '22 15:09

Jeffrey Blattman


Use JavaCV. http://code.google.com/p/javacv/ Its allready precompiled for Android 2.2 : http://code.google.com/p/javacv/downloads/list

like image 23
Shorty123 Avatar answered Sep 21 '22 15:09

Shorty123