I am converting my eclipse project into android studio by adding code of different files like menifest,java,res manually.When I run the project it shows error:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/IntegerRes.class
Here is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.example.tms032.demo_pos_rs"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile project(':CustomCalendarView')
compile files('libs/commons-discovery-0.2.jar')
compile files('libs/commons-lang-2.5.jar')
compile files('libs/gson-2.2.2.jar')
compile files('libs/javax.wsdl_1.6.2.v201005080631.jar')
compile files('libs/log4j-1.2.16.jar')
compile files('libs/picasso-2.0.0.jar')
compile files('libs/posindev.jar')
compile files('libs/printingSDK-7.5.0-javadoc.jar')
compile files('libs/sqljet.1.0.2.b885.jar')
compile files('libs/upg_bridge.jar')
testCompile 'junit:junit:4.12'
}
How to get read of this error? I have tried many solutions. but none of them works.