2015-09-04 21 views
3

我有一個android studio的問題。我已導入Eclipse項目,但是當我運行這個項目,我得到這個錯誤:執行失敗的任務':splash:dexDebug'

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_60\bin\java.exe'' finished with non-zero exit value 2

我不知道爲什麼我收到這個錯誤。 請幫幫我。謝謝

+0

什麼是依賴問題? – Pauland

回答

3

這可能是由於一些依賴性問題。 逐個刪除依賴關係並運行應用程序。然後您可以輕鬆解決此問題。

9

是什麼導致了這個問題?

The Dalvik Executable specification limits the total number of methods that can be referenced within a single DEX file to 65,536, including Android framework methods, library methods, and methods in your own code.

參見Google docs

如何解決?

在gradle中添加multiDexEnabled true

defaultConfig { 
     applicationId "com.xyz.foo" 
     minSdkVersion 16 
     targetSdkVersion 23 
     versionCode 17 
     versionName "1.0" 

     // Enabling multidex support. 
     multiDexEnabled true 

     } 
... 

dependencies { 
    compile 'com.android.support:multidex:1.0.1' 
} 
相關問題