MoPub:TransformException - ZipException:在Gradle上构建时重复条目 [英] MoPub: TransformException - ZipException: duplicated entry when building on gradle
问题描述
我将sdk导入到我的应用程序中:
compile('com.mopub.sdk.android:mopub:4.4.1@aar'){
transitive = true;
}
但是当我尝试构建它时,会返回一个错误。
$ b
错误:任务
'执行失败:app:transformClassesWithJarMergingForDebug'。
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:
com / google / android / gms / internal / zzqq $ zza.class
我导入了 com.google.android.gms $
compile('com.google.android.gms:play-services-base: ('com.google.android.gms:play-services-location:8.3.0'){$ b $
exclude module:'support-v4'
}
compile('com.google.android.gms:play-services-gcm:8.3.0'){
exclude module :'support-v4'
}
compile('com.google.android.gms:play-services-maps:8.3.0 ){
exclude module:'support-v4'
}
compile('com.google.android.gms:play-services-appinvite:8.3.0'){
排除模块:'support-v4'
}
compile('com.google.android.gms:play-services-analytics:8.3.0'){
排除模块:'support- v4'
}
所以我想我会将它们从sdk中排除:
compile('com.mopub.sdk.android:mopub:4.4.1@aar'){
exclude group:' com.google.android.gms'
}
仍然无效。
然后我尝试删除传递:
compile('com.mopub .sdk.android:mopub:4.4.1@aar')
仍然无效。 / p>
如何将MoPub sdk成功集成到我的android应用程序中?
其实我找到了答案。
我试图使用facebook audi ence network sdk和那个sdk是导致冲突的原因 - 在facebook受众网络sdk中这样做导致应用程序再次编译。
compile('com.facebook.android:audience-network-sdk:4.+'){
exclude group:'com.google.android.gms'
}
I'm trying to integrate MoPub into my app.
I imported the sdk into my app:
compile('com.mopub.sdk.android:mopub:4.4.1@aar') {
transitive = true;
}
But an error is returned when I tried to build it.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzqq$zza.class
I have imported the com.google.android.gms
llibrary into my app:
compile('com.google.android.gms:play-services-base:8.3.0') {
exclude module: 'support-v4'
}
compile('com.google.android.gms:play-services-location:8.3.0') {
exclude module: 'support-v4'
}
compile('com.google.android.gms:play-services-gcm:8.3.0') {
exclude module: 'support-v4'
}
compile('com.google.android.gms:play-services-maps:8.3.0') {
exclude module: 'support-v4'
}
compile('com.google.android.gms:play-services-appinvite:8.3.0') {
exclude module: 'support-v4'
}
compile('com.google.android.gms:play-services-analytics:8.3.0') {
exclude module: 'support-v4'
}
So I thought I would exclude them from the sdk:
compile('com.mopub.sdk.android:mopub:4.4.1@aar') {
exclude group: 'com.google.android.gms'
}
Still doesn't work.
Then I tried to remove transitive:
compile('com.mopub.sdk.android:mopub:4.4.1@aar')
Still doesn't work.
How do I get this MoPub sdk to integrate successfully into my android app?
Actually I found the answer.
I'm trying to use the facebook audience network sdk and that sdk was the one that caused the conflict - doing this in the facebook audience network sdk caused the app to compile again.
compile ('com.facebook.android:audience-network-sdk:4.+') {
exclude group: 'com.google.android.gms'
}
这篇关于MoPub:TransformException - ZipException:在Gradle上构建时重复条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!