Search code examples
androiddalvik

Trouble processing "javax/xml/XMLConstants.class" in Android


I am creating an Application which uses 3 jar files in my libs folder.

  • commons-codec-1.8.jar
  • jaxp-api-1.4.2.jar
  • log4j-1.2.14.jar

When I run the Application, I am getting an error "Dx trouble processing "javax/xml XMLConstants.class":"

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

and

"Conversion to Dalvik format failed with error 1"

I tried with removing the JAR files, but it results in errors in the code.

Please suggest me what I need to do here to solve this issues.


Solution

  • I found solution for my issue.

    commons-codec-1.8.jar and jaxp-api-1.4.2.jar were creating the issues since it contains some common class files. I removed jaxp-api-1.4.2.jar from my project and everything works fine now.