0

I tried to build apk it comes out this. What should I do? Please help!!

I don't where is the problem. The project is fine when I build the project, but it come error when I build apk.

Error:Execution failed for task':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/auth/api/signin/internal/zzf.class

Here is the gradle file

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '25.0.0'

defaultConfig {
    applicationId 'com.androidbelieve.SeeDate'
    minSdkVersion 19
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
    useLibrary 'org.apache.http.legacy'
    multiDexEnabled true
}
packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
repositories {
    jcenter {
        url "http://jcenter.bintray.com/"
    }
}
productFlavors {
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:support-v4:22.2.1'
compile 'it.neokree:MaterialNavigationDrawer:1.3.3'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.code.findbugs:jsr305:2.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.firebase:firebase-client-android:2.5.0'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.firebaseui:firebase-ui:0.6.0'
}
apply plugin: 'com.google.gms.google-services'

gradle project

buildscript {
repositories {
    jcenter()
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.3.3'

    classpath 'com.google.gms:google-services:3.1.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
}
}
ɢʀᴜɴᴛ
  • 32,025
  • 15
  • 116
  • 110
abcde581125
  • 91
  • 10

2 Answers2

0

Did you tried Build/Clean Project in Android Studio Menu

Sathish
  • 33
  • 4
0

Which dependency does the app:transformClassesWithJarMergingForDebug come from? Maybe you should modify that dependency's version number to be consistent with the major sdk version.

Dictator
  • 105
  • 1
  • 9