我的應用程序gradle文件如下所示。Android:錯誤:任務執行失敗':app:dexDebug'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile project(':purpleb2b')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.thomashaertel:multispinner:0.1.1'
compile 'com.itextpdf.tool:xmlworker:5.5.8'
compile 'com.google.android.gms:play-services:8.4.0' }
當我添加最後一個庫(播放服務)時,它給了我下面的錯誤。
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
的purpleb2b是自定義庫中的項目和它的依賴關係如下
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'de.greenrobot:greendao:2.0.0'
compile 'com.google.code.gson:gson:2.4'
compile 'me.neavo:volley:2014.12.09'
compile 'org.apache.httpcomponents:httpmime:4.3.1'
compile 'org.apache.httpcomponents:httpcore:4.3.1'
compile 'itext:itext:1.3.1'
compile 'org.json:json:20151123'
compile 'com.opencsv:opencsv:3.6'
compile 'org.apache.httpcomponents:httpclient:4.5'
}
如果我刪除播放業務一切正常。 能否請你幫我解決這個問題...
衝突'編譯'com.android.support:appcompat-v7''使用任何一個 –
添加multiDexEnabled true ... –
您可以粘貼您的完整gradle文件嗎?你的build.gradle文件也是。您是否在那裏添加了「com.google.gms:google-services」依賴關係? –