I have been working on a Android Web Services program that uses a number of classes from Sun's javax libraries. The eclipse IDE is barking "Attempt to include a core class (java.* or javax.* ) in something other than a core library." My application is an Android application and I am not creating a core library. I am using several .jars; javax.xml.ws, javax.xml.bind, javax.xml.soap, javax.xml.rpc, and javax.jws. I believe I cannot use these java bytecode .jars directly. I will have to use the dx tool to convert them to delvik bytecode or .dex files. I have done some additional research and have found that use of any javax.* classes in an android application are forbidden. Can someone explain why? Are their practical programming work arounds?
Thanks, Steve
That's because those jars use core core libraries. Android does not support the complete J2SE, but rather a subset of it: http://developer.android.com/reference/packages.html
Thus, you cannot use Java core libraries because they don't belong to the Android SDK.
You need to use an alternate library to handle SOAP in Android - the Sun provided libraries do not work.
One popular alternative is KSOAP2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With