Reputation: 335
I'm new to Android development and I wonder if I can use some Java packages (for instance javax.xml.bind, org.springframework or org.jooq) on Android platform despite the fact they are not listed on packages list of Android API. Is it possible when I simply import them as external JARs? At this moment I don't care if they are big, just if they can work on Android. Thanks for help.
Upvotes: 1
Views: 198
Reputation: 2101
As recommended by TeamMCS, try to import your librairies in your Android project. That's what we done with a SOAP client library and we saw that it depends on other Java librairies; librairies that are present in the standard JRE (i.e. Sun JRE on computer) but not provided with the Android OS.
Upvotes: 0
Reputation: 2414
It Depends.
Android is built on a subset of Java 1.6. If the library uses references to classes that Android doesn't have, I believe the ADT plugin will give you an error about system level libraries WON'T work on Android. Something to that effect.
Upvotes: 2
Reputation: 1889
I wouldn't recommend it. The guys at Android included libraries that they knew worked with their system (and probably modified them).
Just importing a Java library that isn't part of the Android API and isn't written specifically for Android probably won't end well.
There are a lot of differences between mobile and Desktop computing.
Upvotes: 0