未知的构建问题(app:transformClassesWithJarMergingForDebug)

时间:2016-12-23 06:35:28

标签: android android-studio google-maps-android-api-2 android-build merge-conflict-resolution

  

错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。   com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / android / gms / maps / GoogleMapOptions.class

     

开始了Gradle同步    Gradle同步已完成    执行任务:[:app:generateDebugSources,:app:generateDebugAndroidTestSources,:app:mockableAndroidJar,:app:prepareDebugUnitTestDependencies]     Gradle build在16s 492ms完成     执行任务:[:app:assembleDebug]     Gradle build在8s 883ms内完成了1个错误

以下是apps build gradle(模块:app)

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "24.0.2"

defaultConfig {
    applicationId "com.accordhk.vexus"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),            'proguard-rules.pro'
    }
}
sourceSets {
    main {
        aidl.srcDirs = ['src/main/java']
        jniLibs.srcDirs = ['src/main/jniLibs']
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'com.google.firebase:firebase-messaging:9.0.1'
compile 'com.isseiaoki:simplecropview:1.1.4'
compile 'com.google.android.gms:play-services-maps:9.0.1'
compile files('libs/PIA_FrameWork.jar')

compile files('libs/gson-2.0.jar')
compile files('libs/locSDK_3.3.jar')
compile files('libs/xUtils-2.6.14.jar')
compile 'eu.the4thfloor.volley:com.android.volley:2015.05.28'
compile files('libs/iport.jar')
}

Gradle sync已完成,但Gradle构建出现上述blockquote中提到的错误,但我不知道如何解决此问题。谁能给我一些解决方案来解决这个问题?非常感谢你。

1 个答案:

答案 0 :(得分:0)

请将build.gradle修改为

android {

compileSdkVersion 24

buildToolsVersion“24.0.2”

}

defaultConfig {

targetSdkVersion 24

}

依赖项{

编译'com.android.support:appcompat-v7:24.0.2'

}