rosjava / android_core

Android libraries for rosjava
146 stars 166 forks source link

Javax namespace clashes #209

Open stonier opened 10 years ago

stonier commented 10 years ago

For people using Android Studio doing non-ros builds (i.e. just using the maven repo), they get errors stating the xml-apis library is causing problems by using a standard javax namespace.

See this question and this one (which includes a workaround) also on ros answers.

stonier commented 10 years ago

A copy of the error

* What went wrong:
Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
        /opt/android-studio/sdk/build-tools/19.1.0/dx --dex --output /home/snorri/tmp/testies/MyApplication/app/build/intermediates/pre-dexed/debug/xml-apis-1.0.b2-8ccd5c2437a832c41575a77f1ba0eb835963a0fd.jar /home/snorri/.gradle/caches/modules-2/files-2.1/xml-apis/xml-apis/1.0.b2/3136ca936f64c9d68529f048c2618bd356bf85c9/xml-apis-1.0.b2.jar
  Error Code:
        1
  Output:

        trouble processing "javax/xml/parsers/DocumentBuilder.class":

        Ill-advised or mistaken usage of a core class (java.* or javax.*)
        when not building a core library.

        This is often due to inadvertently including a core library file
        in your application's project, when using an IDE (such as
        Eclipse). If you are sure you're not intentionally defining a
        core class, then this is the most likely explanation of what's
        going on.

        However, you might actually be trying to define a class in a core
        namespace, the source of which you may have taken, for example,
        from a non-Android virtual machine project. This will most
        assuredly not work. At a minimum, it jeopardizes the
        compatibility of your app with future versions of the platform.
        It is also often of questionable legality.