I am trying to import eclipse project into android studio.After that adding my jar file i.e support jar into build gradle file whatever I have used in eclipse. While doing that getting below error.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/database/DatabaseUtilsCompat.class and my build gradle file is:
apply plugin: 'com.android.application' configurations { // all*.exclude group: 'com.android.support', module: 'support-v4' // all*.exclude group: 'com.android.support', module: 'support-annotations' } android { compileSdkVersion 25 buildToolsVersion "26.0.0" useLibrary 'org.apache.http.legacy' defaultConfig { applicationId "com.xxx.xxxxx" minSdkVersion 19 targetSdkVersion 25 multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } aaptOptions { cruncherEnabled = false } } dependencies { //compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.google.android.gms:play-services:+' compile files('libs/android-query-full.0.26.7.jar') compile files('libs/commons-httpclient-3.0.1.jar') compile files('libs/glide-3.6.1.jar') compile files('libs/httpmime-4.1.3.jar') compile files('libs/library-1.2.1.jar') compile files('libs/mpandroidchartlibrary-2-2-4.jar') compile files('libs/picasso-2.4.0.jar') compile files('libs/android-support-v4.jar') compile files('libs/android-support-v7-appcompat.jar') compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') { exclude module: 'support-v4' // exclude duplicate library } }