>Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/api/zzf.class
Getting this error whenever i try to generate signed apk..
Have tried cleaning code Have tried excluding packages
Build.Gradle(app)
apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion "26.0.1" defaultConfig { applicationId "com.app.app" minSdkVersion 16 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true multiDexEnabled true manifestPlaceholders = [onesignal_app_id: "", // Project number pulled from dashboard, local value is ignored. onesignal_google_project_number: ""] } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'cn.pedant.sweetalert:library:1.3' compile 'com.onesignal:OneSignal:[3.6.2, 3.99.99]' compile 'com.yalantis:contextmenu:1.0.7' compile 'com.crystal:crystalrangeseekbar:1.1.1' compile 'com.github.mzelzoghbi:zgallery:0.3' compile 'com.rengwuxian.materialedittext:library:2.1.4' compile 'com.yalantis:flipviewpager:1.0.0' compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support:design:26.+' compile 'com.android.support:support-vector-drawable:26.+' compile 'com.android.support:support-v4:26.0.0-alpha1' compile 'com.squareup.picasso:picasso:2.3.2' compile 'com.nineoldandroids:library:2.4.0' compile 'com.google.zxing:core:3.2.1' compile 'com.google.firebase:firebase-core:11.4.2' testCompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services'