Com.google.android.gms 已添加到输出中。请删除重复的对象
Com.google.android.gms has already been added to output. Please remove duplicate objects
我试图将我应用程序的分析从 Mixpanel 和 Google Analytics 移动到 Segment.io。当我尝试构建我的应用程序时,它总是失败。基于一些谷歌搜索,我认为有一个库重复了。但是我无法弄清楚是哪个库导致了这个问题。
我能追踪到是哪个库导致了问题吗?
谢谢。
app/libs
适配器 1.0.1.jar
android-async-http-1.4.3.jar
android-viewbadger.jar
commons-lang3-3.3.1.jar
endless-1.2.3.jar
GoogleConversionTrackingSdk-2.2.1.jar
libphonenumber-5.9.jar
Parse-1.8.2.jar
PayPal_MECL.jar
PayPalAndroidSDK-2.8.4.jar
build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services-base:6.5.87'
compile 'com.google.android.gms:play-services-appindexing:6.5.87'
compile 'com.google.android.gms:play-services-gcm:7.0.0'
compile 'com.google.android.gms:play-services-location:7.0.0'
compile 'com.google.android.gms:play-services-maps:6.5.87'
compile 'com.google.android.gms:play-services-wallet:6.5.87'
compile 'com.android.support:support-v4:22.1.1'
compile 'com.parse.bolts:bolts-android:1.1.2'
compile 'com.facebook.android:facebook-android-sdk:3.23.1'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'se.emilsjolander:stickylistheaders:2.6.0'
compile 'com.sothree.slidinguppanel:library:3.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
apt 'com.michaelpardo:ollie-compiler:0.3.1'
compile 'com.michaelpardo:ollie:0.3.1'
compile project(':SlidingMenuLibrary')
compile project(':ProgressWheel-master')
compile project(':simplecropimagelib')
compile 'com.splunk.mint:mint:4.1'
compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') {
transitive = true;
}
compile('com.segment.analytics.android:analytics-core:+') {
transitive = true
}
compile('com.segment.analytics.android:analytics-integration-google-analytics:3.1.5') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-mixpanel:+') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-localytics:+') {
transitive = true
}
}
Error:Class com.google.android.gms.internal.zzpw has already been added to output. Please remove duplicate copies.
Error:Class com.google.android.gms.internal.zzoy has already been added to output. Please remove duplicate copies.
2 errors; aborting
Error:Execution failed for task ':app:dexStagingDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/abrahamks/Development/android-sdk-macosx/build-tools/22.0.1/dx -JXmx2048M --dex --no-optimize --output /WOM-Android/app/build/intermediates/dex/staging/debug --input-list=/WOM-Android/app/build/intermediates/tmp/dex/staging/debug/inputList.txt
Error Code:
1
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzpw;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:732)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access0(Main.java:83)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzoy;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:732)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access0(Main.java:83)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
2 errors; aborting
我以为你的 Google Play Service 主要版本不一致。
尝试使用相同主要版本的库。例如,将您的图书馆升级到 7.5.0
.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-appindexing:7.5.0'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.google.android.gms:play-services-maps:7.5.0'
compile 'com.google.android.gms:play-services-wallet:7.5.0'
compile 'com.android.support:support-v4:22.1.1'
compile 'com.parse.bolts:bolts-android:1.1.2'
compile 'com.facebook.android:facebook-android-sdk:3.23.1'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'se.emilsjolander:stickylistheaders:2.6.0'
compile 'com.sothree.slidinguppanel:library:3.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
apt 'com.michaelpardo:ollie-compiler:0.3.1'
compile 'com.michaelpardo:ollie:0.3.1'
compile project(':SlidingMenuLibrary')
compile project(':ProgressWheel-master')
compile project(':simplecropimagelib')
compile 'com.splunk.mint:mint:4.1'
compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') {
transitive = true;
}
compile('com.segment.analytics.android:analytics-core:+') {
transitive = true
}
compile('com.segment.analytics.android:analytics-integration-google-analytics:3.1.5') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-mixpanel:+') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-localytics:+') {
transitive = true
}
}
我试图将我应用程序的分析从 Mixpanel 和 Google Analytics 移动到 Segment.io。当我尝试构建我的应用程序时,它总是失败。基于一些谷歌搜索,我认为有一个库重复了。但是我无法弄清楚是哪个库导致了这个问题。
我能追踪到是哪个库导致了问题吗?
谢谢。
app/libs
适配器 1.0.1.jar
android-async-http-1.4.3.jar
android-viewbadger.jar
commons-lang3-3.3.1.jar
endless-1.2.3.jar
GoogleConversionTrackingSdk-2.2.1.jar
libphonenumber-5.9.jar
Parse-1.8.2.jar
PayPal_MECL.jar
PayPalAndroidSDK-2.8.4.jar
build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services-base:6.5.87'
compile 'com.google.android.gms:play-services-appindexing:6.5.87'
compile 'com.google.android.gms:play-services-gcm:7.0.0'
compile 'com.google.android.gms:play-services-location:7.0.0'
compile 'com.google.android.gms:play-services-maps:6.5.87'
compile 'com.google.android.gms:play-services-wallet:6.5.87'
compile 'com.android.support:support-v4:22.1.1'
compile 'com.parse.bolts:bolts-android:1.1.2'
compile 'com.facebook.android:facebook-android-sdk:3.23.1'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'se.emilsjolander:stickylistheaders:2.6.0'
compile 'com.sothree.slidinguppanel:library:3.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
apt 'com.michaelpardo:ollie-compiler:0.3.1'
compile 'com.michaelpardo:ollie:0.3.1'
compile project(':SlidingMenuLibrary')
compile project(':ProgressWheel-master')
compile project(':simplecropimagelib')
compile 'com.splunk.mint:mint:4.1'
compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') {
transitive = true;
}
compile('com.segment.analytics.android:analytics-core:+') {
transitive = true
}
compile('com.segment.analytics.android:analytics-integration-google-analytics:3.1.5') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-mixpanel:+') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-localytics:+') {
transitive = true
}
}
Error:Class com.google.android.gms.internal.zzpw has already been added to output. Please remove duplicate copies.
Error:Class com.google.android.gms.internal.zzoy has already been added to output. Please remove duplicate copies. 2 errors; aborting
Error:Execution failed for task ':app:dexStagingDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/abrahamks/Development/android-sdk-macosx/build-tools/22.0.1/dx -JXmx2048M --dex --no-optimize --output /WOM-Android/app/build/intermediates/dex/staging/debug --input-list=/WOM-Android/app/build/intermediates/tmp/dex/staging/debug/inputList.txt
Error Code: 1
Output: UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzpw; at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122) at com.android.dx.dex.file.DexFile.add(DexFile.java:161) at com.android.dx.command.dexer.Main.processClass(Main.java:732) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673) at com.android.dx.command.dexer.Main.access0(Main.java:83) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:602) at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166) at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144) at com.android.dx.command.dexer.Main.processOne(Main.java:632) at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzoy; at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122) at com.android.dx.dex.file.DexFile.add(DexFile.java:161) at com.android.dx.command.dexer.Main.processClass(Main.java:732) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673) at com.android.dx.command.dexer.Main.access0(Main.java:83) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:602) at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166) at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144) at com.android.dx.command.dexer.Main.processOne(Main.java:632) at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) 2 errors; aborting
我以为你的 Google Play Service 主要版本不一致。
尝试使用相同主要版本的库。例如,将您的图书馆升级到 7.5.0
.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-appindexing:7.5.0'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.google.android.gms:play-services-maps:7.5.0'
compile 'com.google.android.gms:play-services-wallet:7.5.0'
compile 'com.android.support:support-v4:22.1.1'
compile 'com.parse.bolts:bolts-android:1.1.2'
compile 'com.facebook.android:facebook-android-sdk:3.23.1'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'se.emilsjolander:stickylistheaders:2.6.0'
compile 'com.sothree.slidinguppanel:library:3.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
apt 'com.michaelpardo:ollie-compiler:0.3.1'
compile 'com.michaelpardo:ollie:0.3.1'
compile project(':SlidingMenuLibrary')
compile project(':ProgressWheel-master')
compile project(':simplecropimagelib')
compile 'com.splunk.mint:mint:4.1'
compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') {
transitive = true;
}
compile('com.segment.analytics.android:analytics-core:+') {
transitive = true
}
compile('com.segment.analytics.android:analytics-integration-google-analytics:3.1.5') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-mixpanel:+') {
transitive = true
}
// Add other dependencies as you want here
compile('com.segment.analytics.android:analytics-integration-localytics:+') {
transitive = true
}
}