Unknown build issue (app:transformClassesWithJarMergingForDebug)

72 views Asked by At

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/maps/GoogleMapOptions.class

Gradle sync started Gradle sync completed Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies] Gradle build finished in 16s 492ms Executing tasks: [:app:assembleDebug] Gradle build finished with 1 error(s) in 8s 883ms

The following is the apps build gradle (Module: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 completed but Gradle build got an error which is mentioned in the above blockquote but I don't know how to solve this problem. Can anyone give me some solutions to encounter this problem? Thank you very much.

1

There are 1 answers

3
Sachit karki On

Please modify your build.gradle as

android {

compileSdkVersion 24

buildToolsVersion "24.0.2"

}

defaultConfig {

targetSdkVersion 24

}

dependencies {

compile 'com.android.support:appcompat-v7:24.0.2'

}