-3

I try to search in google,but it still doesn't work!
my jdk environment configuration is correct.
I have no idea what's wrong with my project, do you know how to deal with it?

Here's the Error information:

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72321Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2321Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithDexForDebug
trouble processing "javax/xml/XMLConstants.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.
If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, 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 be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.
If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.

1 error; aborting

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_31\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 12.475 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Wang.J
  • 103
  • 9
  • the Error was occurred when i Run my app – Wang.J Apr 13 '16 at 11:48
  • dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') // testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'org.apache.poi:poi:3.14' compile 'org.apache.poi:poi-ooxml:3.14' compile 'org.apache.poi:poi-ooxml-schemas:3.14' compile 'dom4j:dom4j:1.6.1' } – Wang.J Apr 13 '16 at 12:29
  • What went wrong: Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/xmlbeans/xml/stream/Location.class – Wang.J Apr 13 '16 at 12:45
  • My English is poor,Please help me. – Wang.J Apr 13 '16 at 12:46
  • 1
    Please format your question obeying at least paragraphs in the error message. It's very hard to read. See http://stackoverflow.com/help/formatting – totoro Apr 13 '16 at 13:06
  • thanks.i'm new here. – Wang.J Apr 13 '16 at 14:02

2 Answers2

1

it seems there is some issues in xmlbeans jar in maven itself.

You need to prepare jar and put it in libs folder.

Check this answer in SO

Community
  • 1
  • 1
nitinkumarp
  • 2,120
  • 1
  • 21
  • 30
0

Sometimes it's occur in Android-studio restart your Android studio and run again. hope it will heplful

Krishna
  • 893
  • 1
  • 10
  • 24
  • Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/xmlbeans/xml/stream/Location.class – Wang.J Apr 13 '16 at 12:55
  • it said that i have the same duplicate entry,how can i deal with? – Wang.J Apr 13 '16 at 12:55
  • Open your root directory of project in terminal add this command " ./gradlew clean" For WIndows - ".\gredlew.bat clean" It will work. – Krishna Apr 13 '16 at 13:37
  • I've already tried it,it seems like that there are two same classes in the apache jar.i used 3 of poi jars. – Wang.J Apr 13 '16 at 14:29