天天看點

Error:Execution failed for task ':app:preDexDebug'. > com.android.ide.common.process.ProcessExceptio

Error:Execution failed for task ‘:app:preDexDebug’. > com.android.ide.common.process.ProcessExceptio

問題描述

最近公司将公司的一個項目從eclipse遷移到AndroidStduio當中的時候遇到了一問題,

程式編譯能通過,但是會報上面這個錯誤,相信現在你也遇到了這個問題,才找到我這篇部落格

**程式出現這個問題的原因,我個人總結如下**
           
  • 一個module下有不同版本的jar包,換句話說 相同功能的jar,不同的版本号
  • 在你的module的build.gradle中已經配置了–> compile fileTree(dir: ‘libs’, include: [‘*.jar’]),但是你仍然将其中的某些jar包單獨compile file(‘libs/xxxxxxxx.jar’)了一次,這個也會沖突
  • 一個module上的libs目錄下有這個jar但是你的src中也有這個源碼,也會報錯

在這給個stackoverflow對于這個問題的讨論

Error:Execution failed for task ‘:app:preDexDebug’. > com.android.ide.common.process.ProcessExceptio

再此祝你好運,say u again~

繼續閱讀