3

我正在尝试youtube在我的应用程序中实现搜索。我收到以下错误

Error:Execution failed for task ':packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: com/google/common/annotations/Beta.class

这是我的gradle文件

dependencies {

    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile 'org.lucasr.twowayview:twowayview:0.1.4'
    compile 'com.google.guava:guava:18.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.facebook.android:facebook-android-sdk:4.5.0'
    compile 'com.google.apis:google-api-services-youtube:v3-rev145-1.20.0'
    compile 'com.google.oauth-client:google-oauth-client-jetty:1.20.0'

    compile project(':qsmack322')
    compile project(':viewpagerindicator')
    compile project(':Emojicon')
    compile project(':CircleLoader')

    compile files('libs/acra-4.5.0.jar')
    compile files('libs/android-sqlite-asset-helper.jar')
    compile files('libs/aws-android-sdk-2.1.7-core.jar')
    compile files('libs/aws-android-sdk-2.1.7-s3.jar')
    compile files('libs/commons-io-2.4.jar')
    compile files('libs/daocore.jar')
    compile files('libs/gcmnoti.jar')
    compile files('libs/google-api-client-1.4.1-beta.jar')
    compile files('libs/google-api-client-googleapis-1.4.1-beta.jar')
    compile files('libs/httpmime-4.1.1.jar')
    compile files('libs/jackson-core-asl-1.6.7.jar')
    compile files('libs/newrelic.android.jar')
    compile files('libs/rebound-v0.3.3.jar')
    compile files('libs/twitter4j-core-3.0.5.jar')
    compile files('libs/universal-image-loader-1.9.1-with-sources.jar')

}

请帮助我!!!

4

2 回答 2

0

重复条目,这可能意味着

compile files('libs/google-api-client-1.4.1-beta.jar')
compile files('libs/google-api-client-googleapis-1.4.1-beta.jar')

删除其中一个..

于 2015-09-10T06:43:32.367 回答
0

尝试添加multiDexEnabled true你的gradle

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"        
    defaultConfig {
        applicationId "com.your.package"
        minSdkVersion 17
        targetSdkVersion 22
        multiDexEnabled true
    }
}
于 2015-09-10T07:23:43.950 回答