重复条目:com / google / android / gms / dynamic / LifecycleDelegate.class

时间:2015-12-12 12:21:03

标签: android google-maps-api-3 parse-platform

当我尝试执行我的应用时出现以下错误。

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.> java.util.zip.ZipException: duplicate entry: com/google/android/gms/dynamic/LifecycleDelegate.class

我认为这个错误与我的gradle文件有关,如下所示

enandroid {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
    applicationId "com.example.nirmal.sportsparse"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}}
dependencies {
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.android.support:multidex:1.0.0'
}
dependencies {
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
}

如果我包含multidex支持,我会收到上述错误 如果我禁用它,我会收到以下错误

Error:Execution failed for task ':app:dexDebug'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_60\bin\java.exe'' finished with non-zero exit value 2

这是什么原因以及如何解决这个问题?

0 个答案:

没有答案