Hi Oscar,

I was getting this error because my "fileset dir=" in the dex call of
my ant build.xml was pointing to a directory with many, many jar files
in it, most of which were referencing javax classes (which, of course,
you can/should never do in Android), and I fixed this problem by
copying the one external lib that I actually needed, which is Apache's
"commons-codec.jar" from that directory and into its own directory,
which I then had "fileset dir=" point to in my build file's dex call.
I then rebuilt, and the error went away.

So my guess is that, unlike "commons-codec.jar" which is free of javax-
references, "stax-api-1.0-2.jar" has javax references inside it, and
you should probably look into what places in your Android code are
using that library, and consider using an Android-safe alternative
other than that library.  Passing the --core-libary option would
probably not be a good solution.

Best of luck!
-Zack

On Aug 27, 5:44 pm, "Oscar Castaneda" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm building a reduced set of Tuscany modules to get a sample Tuscany
> application running on Android. However, building results in the error shown
> below. How can I pass the "--core-library" option to the compiler and would
> this be a solution? The problem is arising when processing class files from
> stax-api-1.0-2.jar. Any ideas or thoughts on how to finish the build
> successfully would be greatly appreciated.
>
> [2008-08-27 23:23:55 - calculator-android]
> trouble processing "javax/xml/namespace/QName$1.class":
> [2008-08-27 23:23:55 - calculator-android]
> Attempt to include a core VM class in something other than a core library.
> It is likely that you have attempted to include the core library from a
> desktop
> virtual machine into an application, which will most assuredly not work. If
> you really intend to build a core library -- which is only appropriate as
> part of creating a full virtual machine binary, as opposed to compiling an
> application -- then use the "--core-library" option to suppress this error
> message. If you go ahead and use "--core-library" but are in fact building
> an application, then please be aware that your build will still fail at some
> point; you will simply be denied the pleasure of reading this helpful error
> message.
> [2008-08-27 23:23:55 - calculator-android] 1 error; aborting
> [2008-08-27 23:23:55 - calculator-android] Conversion to Dalvik format
> failed with error 1
>
> --
> best,
> -oscar
>
> Oscar Castañeda
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to