Issues with classnames in jar file

I’m developing an Android application and want to use a jar file. I’ve added it as a library and the gradle sync works fine, I was able to successfully import and use classes from the jar. However, when I try running the application gradle it gives me this error:

trouble processing "javax/xml/stream/EventFilter.class":
    Ill-advised or mistaken usage of a core class (java.* or javax.*)
    when not building a core library.

The package already exists natively in Java and I believe that this is why gradle is having issues with compiling. Alternatively, if I could suppress this warning that may also work (even if its ill advised) because I made a simple test program using the jar in eclipse and it worked perfectly.

The dependency you are adding has declared classes in packages reserved for Java core classes (java, javax, etc). This is an issue with the dependency, not Gradle. You may want to take it up with the developers of that library.

Besides what Mark explained, please also note that Buildship currently does not support Android builds.