I need to import a couple of jars that where compiled under the full implementation of java. I know that Android doesn't use all the packages that java has to offer. My question is: Is it possible to import them without creating errors? Is there a tool that can convert jars to android jars? if so, can some examples be provided. Any help is much appreciated.
views:
27answers:
1
+1
A:
Is it possible to import them without creating errors?
If the JARs refer to classes that Android does not have, no.
Is there a tool that can convert jars to android jars?
There is no such thing as "android jars".
If you have the source code to the JARs in question, between modifying that source code and modifying copies of the missing classes from Apache Harmony, you may be able to get stuff working. However, you cannot just put java.*
or javax.*
classes in your project -- you will have to refactor them into new packages. Also, depending on what classes are missing, this may take thousands of developer-months to accomplish (e.g., reimplementing Swing using 2D Canvas APIs).
CommonsWare
2010-09-29 00:04:39