1

我试图将我的应用程序分析从 Mixpanel 和 Google Analytics 转移到 Segment.io。当我尝试构建我的应用程序时,它总是失败。基于一些谷歌搜索,我认为有一个重复的库。但我不知道是哪个库导致了这个问题。

无论如何我可以追踪导致问题的库吗?

谢谢你。

应用程序/库


adapter-1.0.1.jar
android-async-http-1.4.3.jar
android-viewbadger.jar
commons-lang3-3.3.1.jar never
-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

构建.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
    }
}

错误:com.google.android.gms.internal.zzpw 类已添加到输出。请删除重复的副本。

错误:com.google.android.gms.internal.zzoy 类已添加到输出。请删除重复的副本。2个错误;中止

错误:任务 ':app:dexStagingDebug' 执行失败。

com.android.ide.common.internal.LoggedErrorException:无法运行命令:/Users/abrahamks/Development/android-sdk-macosx/build-tools/22.0.1/dx -JXmx2048M --dex --no-optimize - -输出/WOM-Android/app/build/intermediates/dex/staging/debug --input-list=/WOM-Android/app/build/intermediates/tmp/dex/staging/debug/inputList.txt

错误代码:1

输出:意外的顶级异常:java.lang.IllegalArgumentException:已添加:Lcom/google/android/gms/internal/zzpw;在 com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122) 在 com.android.dx.dex.file.DexFile.add(DexFile.java:161) 在 com.android.dx.command .dexer.Main.processClass(Main.java:732) 在 com.android.dx.command.dexer.Main.processFileBytes(Main.java:673) 在 com.android.dx.command.dexer.Main.access$300( Main.java:83) 在 com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602) 在 com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284) 在com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166) 在 com.android.dx.cf.direct.ClassPathOpener。com.android.dx.command.dexer.Main.processOne(Main.java:632) 处的进程(ClassPathOpener.java:144) com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)在 com.android.dx.command.dexer.Main.runMonoDex(Main.java:280) 在 com.android.dx.command.dexer.Main.run(Main.java:246) 在 com.android.dx.command .dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) 意外的顶级异常:java.lang.IllegalArgumentException:已添加:Lcom/google /android/gms/内部/zzoy;在 com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122) 在 com.android.dx.dex.file.DexFile.add(DexFile.java:161) 在 com.android.dx.command .dexer.Main.processClass(Main.java:732) 在 com.android.dx.command.dexer.Main。main(Main.java:106) 2 个错误;中止

4

1 回答 1

2

我以为您的 Google Play 服务主要版本不一致。

尝试使用相同的主要版本的库。例如,将您的库升级到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
    }
}
于 2015-07-15T10:54:48.427 回答