2016-02-11 194 views
0

我一直在嘗試了幾天,現在得到這個構建以正確完成...它保持與下面的錯誤而失敗:搖籃構建失敗ProcessException

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. 
> com.android.build.api.transform.TransformException: 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 2 

我gradle這個文件,我相信失敗是因爲如下:

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile project(':vitamio') 
    compile project(':zeropush-sdk') 
    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3' 
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3' 
    compile files('libs/YouTubeAndroidPlayerApi.jar') 
    compile 'com.android.support:appcompat-v7:22.2.1' 
    compile 'com.android.support:design:22.2.1' 
    compile 'com.android.support:support-v4:22.2.1' 
    compile 'com.google.android.gms:play-services-analytics:7.5.0' 
    compile 'com.squareup.retrofit:retrofit:1.7.0' 
    compile 'com.squareup:otto:1.3.6' 
    compile 'com.squareup.picasso:picasso:2.4.0' 
    compile 'com.ns-developer:tagcloudview:0.1.0' 
    compile 'com.android.support:recyclerview-v7:22.2.1' 
    compile 'com.android.support:mediarouter-v7:22.1.1' 
    // compile 'com.google.android.exoplayer:exoplayer:r1.4.1' 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 
    androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.4.1' 
} 

我認爲它與添加一個依賴關係兩次......但我看不到任何正在被添加兩次。

有沒有人看到我不應該導入或知道這個錯誤可能意味着什麼?

zeropush-SDK還內置這個項目及其gradle這個文件是這樣的:

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.loopj.android:android-async-http:1.4.6' 
    compile 'com.google.android.gms:play-services:7.5.0' 
} 
+0

用參數--debug運行你的gradle構建併發布它。這裏缺少很多信息。 –

回答

0

我會嘗試做的第一件事就是隻使用谷歌的API的遊戲,你真正需要的,而不是服務到'com.google.android.gms:play-services:7.5.0',參見Google Play Services setup。建議您只添加您正在使用的Google Play服務,而不是所有服務。這將最大限度地減少您的應用程序的大小,並提高對dexing的需求。

至於實際的重複,你有

編譯「com.google.android.gms:發揮服務:7.5.0」 編譯「com.google.android.gms:發揮服務 - 分析:7.5.0'

刪除以下爲快速測試

compile 'com.google.android.gms:play-services:7.5.0' 

,然後添加你需要的任何其他特定谷歌播放服務的API。

從你的libs文件夾中還有其他重複的可能性,但我不能說,因爲它沒有列出。

相關問題