Dev/Error

trouble processing "javax/xml/XMLConstants.class" / 'com.squareup.retrofit2:converter-simplexml:2.1.0'

healthyryu 2017. 12. 18. 20:11


trouble processing "javax/xml/XMLConstants.class" 에러 문제

아마도 이게 문제'com.squareup.retrofit2:converter-simplexml:2.1.0'



이슈 : Release 빌드가 되지 않는 문제가 생겼다.


Error:trouble processing "javax/xml/XMLConstants.class":

Error:Ill-advised or mistaken usage of a core class (java.* or javax.*)

Error:when not building a core library.

Error:This is often due to inadvertently including a core library file

Error:in your application's project, when using an IDE (such as

Error:Eclipse). If you are sure you're not intentionally defining a

Error:core class, then this is the most likely explanation of what's

Error:going on.

Error:However, you might actually be trying to define a class in a core

Error:namespace, the source of which you may have taken, for example,

Error:from a non-Android virtual machine project. This will most

Error:assuredly not work. At a minimum, it jeopardizes the

Error:compatibility of your app with future versions of the platform.

Error:It is also often of questionable legality.

Error:If you really intend to build a core library -- which is only

Error:appropriate as part of creating a full virtual machine

Error:distribution, as opposed to compiling an application -- then use

Error:the "--core-library" option to suppress this error message.

Error:If you go ahead and use "--core-library" but are in fact

Error:building an application, then be forewarned that your application

Error:will still fail to build or run, at some point. Please be

Error:prepared for angry customers who find, for example, that your

Error:application ceases to function once they upgrade their operating

Error:system. You will be to blame for this problem.

Error:If you are legitimately using some code that happens to be in a

Error:core package, then the easiest safe alternative you have is to

Error:repackage that code. That is, move the classes in question into

Error:your own package namespace. This means that they will never be in

Error:conflict with core system classes. JarJar is a tool that may help

Error:you in this endeavor. If you find that you cannot do this, then

Error:that is an indication that the path you are on will ultimately

Error:lead to pain, suffering, grief, and lamentation.

Error:1 error; aborting

Error:Execution failed for task ':iOFIT_App_Phone:transformClassesWithPreDexForRelease'.

Information:Gradle tasks [assembleRelease]

Warning:warning: Ignoring InnerClasses attribute for an anonymous inner class

(com.bea.xml.stream.util.CircularQueue$1) that doesn't come with an

associated EnclosingMethod attribute. This class was probably produced by a

compiler that did not target the modern .class file format. The recommended

solution is to recompile the class from source, using an up-to-date compiler

and without specifying any "-target" type options. The consequence of ignoring

this warning is that reflective operations on this class will incorrectly

indicate that it is *not* an inner class.


Error:trouble processing "javax/xml/XMLConstants.class":

Error:Ill-advised or mistaken usage of a core class (java.* or javax.*)

Error:when not building a core library.

Error:This is often due to inadvertently including a core library file

Error:in your application's project, when using an IDE (such as

Error:Eclipse). If you are sure you're not intentionally defining a

Error:core class, then this is the most likely explanation of what's

Error:going on.

Error:However, you might actually be trying to define a class in a core

Error:namespace, the source of which you may have taken, for example,

Error:from a non-Android virtual machine project. This will most

Error:assuredly not work. At a minimum, it jeopardizes the

Error:compatibility of your app with future versions of the platform.

Error:It is also often of questionable legality.

Error:If you really intend to build a core library -- which is only

Error:appropriate as part of creating a full virtual machine

Error:distribution, as opposed to compiling an application -- then use

Error:the "--core-library" option to suppress this error message.

Error:If you go ahead and use "--core-library" but are in fact

Error:building an application, then be forewarned that your application

Error:will still fail to build or run, at some point. Please be

Error:prepared for angry customers who find, for example, that your

Error:application ceases to function once they upgrade their operating

Error:system. You will be to blame for this problem.

Error:If you are legitimately using some code that happens to be in a

Error:core package, then the easiest safe alternative you have is to

Error:repackage that code. That is, move the classes in question into

Error:your own package namespace. This means that they will never be in

Error:conflict with core system classes. JarJar is a tool that may help

Error:you in this endeavor. If you find that you cannot do this, then

Error:that is an indication that the path you are on will ultimately

Error:lead to pain, suffering, grief, and lamentation.

Error:1 error; aborting

Error:Execution failed for task ':iOFIT_App_Phone:transformClassesWithPreDexForRelease'.

> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex 'C:\Users\dev1\.gradle\caches\modules-2\files-2.1\stax\stax-api\1.0.1\49c100caf72d658aca8e58bd74a4ba90fa2b0d70\stax-api-1.0.1.jar' to 'C:\Users\dev1\AndroidStudioProjects\IOFIT_App\iOFIT_App_Phone\build\intermediates\transforms\preDex\release\23.jar'

Information:BUILD FAILED in 3m 27s

Information:34 errors

Information:1 warning

Information:See complete output in console



거의 모르겠으나 XML 관련 문제였나보다 아래 exclude 추가해주니 빌드가 되었다.

compile ('com.squareup.retrofit2:converter-simplexml:2.1.0') {
        exclude group: 'xpp3', module: 'xpp3'
        exclude group: 'stax', module: 'stax-api'
        exclude group: 'stax', module: 'stax'
    }


해결 방법 : https://stackoverflow.com/a/40293067/3897810

반응형