2017-07-20 62 views
0

我得到這個錯誤也與消息:錯誤:執行任務':app:transformClassesWithJarMergingForDebug'失敗。 > zznn.class

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zznn.class 

這是我的Gradle依賴塊。請幫忙。我也有我的multidexenabled真

compile 'com.android.volley:volley:1.0.0' 
compile project(':BaseGameUtils') 
compile fileTree(dir: 'libs', include: ['*.jar']) 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:25.3.1' 
testCompile 'junit:junit:4.12' 
compile 'com.google.firebase:firebase-appindexing:11.0.2' 
compile 'com.google.android.gms:play-services-ads:11.0.2' 

compile 'com.android.support:recyclerview-v7:25.3.1' 
compile 'com.android.support:design:25.3.1' 

compile "com.squareup.picasso:picasso:2.4.0" 
compile 'com.github.bumptech.glide:glide:3.5.2' 
compile 'de.hdodenhof:circleimageview:1.3.0' 
compile 'com.android.support:cardview-v7:25.3.1' 
compile 'com.android.support:multidex:1.0.1' 

回答

0

我們必須做的是刪除額外的軟件包。

根據您的問題,我們必須知道com/google/android/gms/internal/zznn.class是在哪個包。

然後,我們會發現包並將其刪除。

+0

請您可以指定庫,包應該被刪除? –

+0

@AbhinavMasters在'compile'c​​om.google.android.gms:play-services-ads:11.0.2'' – KeLiuyue

+0

@AbhinavMasters之後加入'{ exclude group:'com.google.android.gms' }'另一種方式解決它,你可以看看這個[https://stackoverflow.com/questions/33209631/errorexecution-failed-for-task-apptransformclasseswithjarmergingfordebug](https://stackoverflow.com/questions/33209631/errorexecution-failed-for -task-apptransformclasseswithjarmergingfordebug) – KeLiuyue

0

根據您的日誌

com/google/android/gms/internal/zznn.class

複製,從而爲解決您必須刪除類文件或排除像

compile 'com.google.android.gms:play-services-ads:11.0.2'{exclude module: "moduleToRemove"}

+0

那麼你能幫我指定刪除這個模塊嗎? –

+0

對於這個問題,你必須得到那個模塊的重複錯誤 –

+0

可能這可以幫助嘗試用'compile('com.google.firebase')代替'com.google.firebase:firebase-appindexing:11.0.2' :firebase-appindexing:11.0.2'){ exclude group:'com.google.android.gms' }' –

相關問題