2016-04-13 184 views
-3

我嘗試在谷歌搜索,但它仍然無法正常工作!
我的jdk環境配置是正確的。
我不知道我的項目有什麼問題,你知道如何處理它嗎?gradle任務失敗!org.gError:執行失敗的任務':app:> com.android.ide.common.process.ProcessException

這裏的錯誤信息:

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 
+0

當我運行我的應用程序 –

+0

依賴{錯誤出現在 編譯文件樹(包括:[ '的* .jar'],DIR: '庫') // testCompile「的JUnit :junit:4.12' compile'c​​om.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' } –

+0

出錯了: 任務':app:transformClassesWithJarMergingForDebug'的執行失敗。 > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重複條目:org/apache/xmlbeans/xml/stream/Location.class –

回答

1

它似乎有一些問題在xmlbeans jar在maven本身。

您需要準備jar並將其放入libs文件夾中。

檢查this答案SO

+0

謝謝,我想我得到了問題 –

0

有時候,重新啓動你的Android工作室,並再次運行發生在Android的工作室。希望它會helllful

+0

事實上,我重新啓動了很多次TAT –

+0

任務':app:transformClassesWithJarMergingForDebug'的執行失敗。 > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重複條目:org/apache/xmlbeans/xml/stream/Location.class –

+0

它說我有相同的重複條目,如何我可以處理嗎? –

相關問題